com.flexive.shared.security
Class PermissionSet

java.lang.Object
  extended by com.flexive.shared.security.PermissionSet
All Implemented Interfaces:
java.io.Serializable

public final class PermissionSet
extends java.lang.Object
implements java.io.Serializable

A concrete permission set for a given content instance. By definition, if such a permission object exists at least the read permission for the related object must have been set, so you cannot create this object without read permissions.

Version:
$Rev: 2906 $
Author:
Daniel Lichtenberger (daniel.lichtenberger@flexive.com), UCS - unique computing solutions gmbh (http://www.ucs.at)
See Also:
Serialized Form

Constructor Summary
PermissionSet(boolean mayEdit, boolean mayRelate, boolean mayDelete, boolean mayExport, boolean mayCreate)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 PermissionSet intersect(PermissionSet other)
          Returns this & other (a permission has to be present in both of the sets).
 boolean isMayCreate()
           
 boolean isMayDelete()
           
 boolean isMayEdit()
           
 boolean isMayExport()
           
 boolean isMayRead()
           
 boolean isMayRelate()
           
 boolean isPermitted(ACLPermission permission)
           
 java.lang.String toString()
           
 PermissionSet union(PermissionSet other)
          Returns this | other (a permission has to be present in one of the sets to be set).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PermissionSet

public PermissionSet(boolean mayEdit,
                     boolean mayRelate,
                     boolean mayDelete,
                     boolean mayExport,
                     boolean mayCreate)
Method Detail

union

public PermissionSet union(PermissionSet other)
Returns this | other (a permission has to be present in one of the sets to be set).

Parameters:
other - the other permission set
Returns:
this | other
Since:
3.1

intersect

public PermissionSet intersect(PermissionSet other)
Returns this & other (a permission has to be present in both of the sets).

Parameters:
other - the other permission set
Returns:
this & other
Since:
3.1

isPermitted

public boolean isPermitted(ACLPermission permission)

isMayRead

public boolean isMayRead()

isMayEdit

public boolean isMayEdit()

isMayRelate

public boolean isMayRelate()

isMayDelete

public boolean isMayDelete()

isMayExport

public boolean isMayExport()

isMayCreate

public boolean isMayCreate()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object