java.lang.Object
org.acegisecurity.acl.basic.AbstractBasicAclEntry
org.acegisecurity.acl.basic.SimpleAclEntry
- All Implemented Interfaces:
- org.acegisecurity.acl.AclEntry, BasicAclEntry, java.io.Serializable
- public class SimpleAclEntry
- extends AbstractBasicAclEntry
Stores some privileges typical of a domain object.
- Version:
- $Id: SimpleAclEntry.java,v 1.2 2005/11/17 00:55:47 benalex Exp $
| Methods inherited from class org.acegisecurity.acl.basic.AbstractBasicAclEntry |
addPermission, addPermissions, deletePermission, deletePermissions, getAclObjectIdentity, getAclObjectParentIdentity, getMask, getRecipient, isPermitted, isPermitted, printPermissionsBlock, setAclObjectIdentity, setAclObjectParentIdentity, setMask, setRecipient, togglePermission, toString |
logger
private static final org.apache.commons.logging.Log logger
NOTHING
public static final int NOTHING
- See Also:
- Constant Field Values
ADMINISTRATION
public static final int ADMINISTRATION
READ
public static final int READ
WRITE
public static final int WRITE
CREATE
public static final int CREATE
DELETE
public static final int DELETE
READ_WRITE_CREATE_DELETE
public static final int READ_WRITE_CREATE_DELETE
READ_WRITE_CREATE
public static final int READ_WRITE_CREATE
READ_WRITE
public static final int READ_WRITE
READ_WRITE_DELETE
public static final int READ_WRITE_DELETE
validPermissions
private static final int[] validPermissions
SimpleAclEntry
public SimpleAclEntry()
- Allows BasicAclDao implementations to construct this object
using
newInstance().
Normal classes should not use this default constructor.
SimpleAclEntry
public SimpleAclEntry(java.lang.Object recipient,
AclObjectIdentity aclObjectIdentity,
AclObjectIdentity aclObjectParentIdentity,
int mask)
getValidPermissions
public int[] getValidPermissions()
- Description copied from class:
AbstractBasicAclEntry
- Subclasses must indicate the permissions they support. Each base
permission should be an integer with a base 2. ie: the first permission
is 2^^0 (1), the second permission is 2^^1 (2), the third permission is
2^^2 (4) etc. Each base permission should be exposed by the subclass as
a
public static final int. It is further recommended that
valid combinations of permissions are also exposed as public
static final ints.
This method returns all permission integers that are allowed to be used
together. This must include any combinations of valid
permissions. So if the permissions indicated by 2^^2 (4) and 2^^1
(2) can be used together, one of the integers returned by this method
must be 6 (4 + 2). Otherwise attempts to set the permission will be
rejected, as the final resulting mask will be rejected.
Whilst it may seem unduly time onerous to return every valid permission
combination, doing so delivers maximum flexibility in ensuring
ACLs only reflect logical combinations. For example, it would be
inappropriate to grant a "read" and "write" permission along with an
"unrestricted" permission, as the latter implies the former
permissions.
- Specified by:
getValidPermissions in class AbstractBasicAclEntry
printPermissionsBlock
public java.lang.String printPermissionsBlock(int i)
- Description copied from class:
AbstractBasicAclEntry
- Outputs the permissions in a human-friendly format. For example, this
method may return "CR-D" to indicate the passed integer permits create,
permits read, does not permit update, and permits delete.
- Specified by:
printPermissionsBlock in class AbstractBasicAclEntry