| java.lang.Object org.acegisecurity.acl.basic.AbstractBasicAclEntry
All known Subclasses: org.acegisecurity.acl.basic.SimpleAclEntry,
AbstractBasicAclEntry | abstract public class AbstractBasicAclEntry implements BasicAclEntry(Code) | | Abstract implementation of
BasicAclEntry . Provides core bit mask handling methods.
author: Ben Alex version: $Id: AbstractBasicAclEntry.java 1496 2006-05-23 13:38:33Z benalex $ |
AbstractBasicAclEntry | protected AbstractBasicAclEntry()(Code) | | A protected constructor for use by Hibernate.
|
addPermission | public int addPermission(int permissionToAdd)(Code) | | |
addPermissions | public int addPermissions(int[] permissionsToAdd)(Code) | | |
deletePermission | public int deletePermission(int permissionToDelete)(Code) | | |
deletePermissions | public int deletePermissions(int[] permissionsToDelete)(Code) | | |
getMask | public int getMask()(Code) | | |
getValidPermissions | abstract public int[] getValidPermissions()(Code) | | 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
int s.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.
every valid combination of permissions |
isPermitted | public boolean isPermitted(int permissionToCheck)(Code) | | |
isPermitted | protected boolean isPermitted(int maskToCheck, int permissionToCheck)(Code) | | |
printPermissionsBlock | abstract public String printPermissionsBlock(int i)(Code) | | 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.
Parameters: i - the integer containing the mask which should be printed the human-friend formatted block |
printPermissionsBlock | public String printPermissionsBlock()(Code) | | Outputs the permissions in human-friendly format for the current AbstractBasicAclEntry 's
mask.
the human-friendly formatted block for this instance |
setMask | public void setMask(int mask)(Code) | | |
setRecipient | public void setRecipient(Object recipient)(Code) | | |
togglePermission | public int togglePermission(int permissionToToggle)(Code) | | |
|
|