public abstract class PentahoAbstractBasicAclEntry extends Object implements IPentahoBasicAclEntry
https://github.com/spring-projects/spring-security/blob/2.0.8.RELEASE/core/src/main/java/org/springframework/security/acl/basic/AbstractBasicAclEntry.java
,
Serialized FormModifier | Constructor and Description |
---|---|
protected |
PentahoAbstractBasicAclEntry()
A protected constructor for use by Hibernate.
|
|
PentahoAbstractBasicAclEntry(Object recipient,
IPentahoAclObjectIdentity aclObjectIdentity,
IPentahoAclObjectIdentity aclObjectParentIdentity,
int mask) |
Modifier and Type | Method and Description |
---|---|
int |
addPermission(int permissionToAdd) |
int |
addPermissions(int[] permissionsToAdd) |
int |
deletePermission(int permissionToDelete) |
int |
deletePermissions(int[] permissionsToDelete) |
IPentahoAclObjectIdentity |
getAclObjectIdentity() |
IPentahoAclObjectIdentity |
getAclObjectParentIdentity() |
int |
getMask() |
Object |
getRecipient() |
abstract int[] |
getValidPermissions()
Subclasses must indicate the permissions they support.
|
boolean |
isPermitted(int permissionToCheck) |
protected boolean |
isPermitted(int maskToCheck,
int permissionToCheck) |
String |
printPermissionsBlock()
Outputs the permissions in human-friendly format for the current
AbstractBasicAclEntry 's
mask. |
abstract String |
printPermissionsBlock(int i)
Outputs the permissions in a human-friendly format.
|
void |
setAclObjectIdentity(IPentahoAclObjectIdentity aclObjectIdentity) |
void |
setAclObjectParentIdentity(IPentahoAclObjectIdentity aclObjectParentIdentity) |
void |
setMask(int mask) |
void |
setRecipient(Object recipient) |
int |
togglePermission(int permissionToToggle) |
String |
toString() |
public PentahoAbstractBasicAclEntry(Object recipient, IPentahoAclObjectIdentity aclObjectIdentity, IPentahoAclObjectIdentity aclObjectParentIdentity, int mask)
protected PentahoAbstractBasicAclEntry()
public int addPermission(int permissionToAdd)
public int addPermissions(int[] permissionsToAdd)
public int deletePermission(int permissionToDelete)
public int deletePermissions(int[] permissionsToDelete)
public IPentahoAclObjectIdentity getAclObjectIdentity()
getAclObjectIdentity
in interface IPentahoBasicAclEntry
public IPentahoAclObjectIdentity getAclObjectParentIdentity()
getAclObjectParentIdentity
in interface IPentahoBasicAclEntry
public int getMask()
getMask
in interface IPentahoBasicAclEntry
public Object getRecipient()
getRecipient
in interface IPentahoBasicAclEntry
public abstract int[] getValidPermissions()
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.
public boolean isPermitted(int permissionToCheck)
isPermitted
in interface IPentahoBasicAclEntry
protected boolean isPermitted(int maskToCheck, int permissionToCheck)
public abstract String printPermissionsBlock(int i)
i
- the integer containing the mask which should be printedpublic String printPermissionsBlock()
AbstractBasicAclEntry
's
mask.public void setAclObjectIdentity(IPentahoAclObjectIdentity aclObjectIdentity)
setAclObjectIdentity
in interface IPentahoBasicAclEntry
public void setAclObjectParentIdentity(IPentahoAclObjectIdentity aclObjectParentIdentity)
setAclObjectParentIdentity
in interface IPentahoBasicAclEntry
public void setMask(int mask)
setMask
in interface IPentahoBasicAclEntry
public void setRecipient(Object recipient)
setRecipient
in interface IPentahoBasicAclEntry
public int togglePermission(int permissionToToggle)
Copyright © 2017 Hitachi Vantara. All rights reserved.