Class PentahoAclEntry
- java.lang.Object
-
- org.pentaho.platform.engine.security.acls.PentahoAbstractBasicAclEntry
-
- org.pentaho.platform.engine.security.acls.PentahoAclEntry
-
- All Implemented Interfaces:
Serializable
,org.pentaho.platform.api.engine.IAclEntry
,org.pentaho.platform.api.engine.IPentahoAclEntry
,org.pentaho.platform.api.engine.IPentahoBasicAclEntry
public class PentahoAclEntry extends PentahoAbstractBasicAclEntry implements org.pentaho.platform.api.engine.IPentahoAclEntry
Base Hitachi Vantara Access Control entry. Subclassed AbstractBasicAclEntry from Spring Security project. Provides known access controls.- Author:
- mbatchel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description int
recipientType
-
Fields inherited from interface org.pentaho.platform.api.engine.IPentahoAclEntry
PERM_ADMIN_ALL, PERM_ADMINISTRATION, PERM_CREATE, PERM_DELETE, PERM_EXECUTE, PERM_EXECUTE_ADMINISTRATION, PERM_EXECUTE_SUBSCRIBE, PERM_FULL_CONTROL, PERM_NOTHING, PERM_SUBSCRIBE, PERM_SUBSCRIBE_ADMINISTRATION, PERM_UPDATE, PERM_UPDATE_PERMS, PERMISSION_PREFIX, PERMISSIONS_LIST_ALL, PERMISSIONS_LIST_SOLUTIONS
-
-
Constructor Summary
Constructors Constructor Description PentahoAclEntry()
PentahoAclEntry(Object recipient, int mask)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
protected String
getRecipientString()
protected int
getRecipientType()
int[]
getValidPermissions()
As implemented, this method says that all permission combinations are valid.static Map
getValidPermissionsNameMap()
static Map
getValidPermissionsNameMap(String permissionsListType)
int
hashCode()
static void
main(String[] args)
String
printPermissionsBlock(int i)
Outputs the permissions in a human-friendly format.void
setRecipient(Object value)
protected void
setRecipientString(String value)
protected void
setRecipientType(int value)
-
Methods inherited from class org.pentaho.platform.engine.security.acls.PentahoAbstractBasicAclEntry
addPermission, addPermissions, deletePermission, deletePermissions, getAclObjectIdentity, getAclObjectParentIdentity, getMask, getRecipient, isPermitted, isPermitted, printPermissionsBlock, setAclObjectIdentity, setAclObjectParentIdentity, setMask, togglePermission, toString
-
-
-
-
Constructor Detail
-
PentahoAclEntry
public PentahoAclEntry()
-
PentahoAclEntry
public PentahoAclEntry(Object recipient, int mask)
-
-
Method Detail
-
setRecipientType
protected void setRecipientType(int value)
-
getRecipientType
protected int getRecipientType()
-
setRecipientString
protected void setRecipientString(String value)
-
getRecipientString
protected String getRecipientString()
-
setRecipient
public void setRecipient(Object value)
- Specified by:
setRecipient
in interfaceorg.pentaho.platform.api.engine.IPentahoBasicAclEntry
- Overrides:
setRecipient
in classPentahoAbstractBasicAclEntry
-
getValidPermissions
public int[] getValidPermissions()
As implemented, this method says that all permission combinations are valid. (Well not all. FULL_CONTROL must stand alone. It cannot be combined with other bits.)- Find the permission value (call it p) that is the highest power of two.
- Find n (0-based) such that 2^n = p. (Uses logarithm with base 2.)
- So there are 2^(n+1) permutations of permission bits.
- So the valid permission values list consists of those 2^(n+1) permutations plus the FULL_CONTROL perm bit. (i.e. (2^(n+1))+1
- Specified by:
getValidPermissions
in classPentahoAbstractBasicAclEntry
- Returns:
- every valid combination of permissions
-
main
public static void main(String[] args)
-
printPermissionsBlock
public String printPermissionsBlock(int i)
Description copied from class:PentahoAbstractBasicAclEntry
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 classPentahoAbstractBasicAclEntry
- Parameters:
i
- the integer containing the mask which should be printed- Returns:
- the human-friend formatted block
-
getValidPermissionsNameMap
public static Map getValidPermissionsNameMap()
- Returns:
- Returns the validPermissionsNameMap. This method is generally useful for UI work as it returns a Map of Permission atomic values (as Integer objects) keyed by a human readable permission name.
-
getValidPermissionsNameMap
public static Map getValidPermissionsNameMap(String permissionsListType)
- Parameters:
permissionsListType
- - The permissions list for solutions is different than that for other UIs- Returns:
- Returns the validPermissionsNameMap. This method is generally useful for UI work as it returns a Map of Permission atomic values (as Integer objects) keyed by a human readable permission name.
-
-