org.apache.jackrabbit.core.security.authorization
Class Permission
java.lang.Object
org.apache.jackrabbit.core.security.authorization.Permission
public final class Permission
- extends java.lang.Object
Permission...
|
Method Summary |
static int |
calculatePermissions(int privs,
int parentPrivs,
boolean isAllow,
boolean protectsPolicy)
Build the permissions granted by evaluating the given privileges. |
static int |
diff(int permissions,
int otherPermissions)
Returns those bits from permissions that are not present in
the otherPermissions, i.e. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NONE
public static final int NONE
- See Also:
- Constant Field Values
READ
public static final int READ
- See Also:
- Constant Field Values
SET_PROPERTY
public static final int SET_PROPERTY
- See Also:
- Constant Field Values
ADD_NODE
public static final int ADD_NODE
- See Also:
- Constant Field Values
REMOVE_NODE
public static final int REMOVE_NODE
- See Also:
- Constant Field Values
REMOVE_PROPERTY
public static final int REMOVE_PROPERTY
- See Also:
- Constant Field Values
ALL
public static final int ALL
- See Also:
- Constant Field Values
Permission
public Permission()
calculatePermissions
public static int calculatePermissions(int privs,
int parentPrivs,
boolean isAllow,
boolean protectsPolicy)
- Build the permissions granted by evaluating the given privileges. If
protectesPolicy is true read and write
permission are only granted if the corresponding ac-privilege is
present.
- Parameters:
privs - The privileges granted on the Node itself (for properties
the ACL of the direct ancestor).parentPrivs - The privileges granted on the parent of the Node. Not
relevant for properties since it only is used to determine permissions
on a Node (add_child_nodes, remove_child_nodes).isAllow - protectsPolicy -
- Returns:
- the permissions granted evaluating the given privileges.
diff
public static int diff(int permissions,
int otherPermissions)
- Returns those bits from
permissions that are not present in
the otherPermissions, i.e. subtracts the other permissions
from permissions.
If the specified otherBits do not intersect with
bits, bits are returned.
If bits is included otherBits,
NONE is returned.
- Parameters:
permissions - otherPermissions -
- Returns:
- the differences of the 2 permissions or
NONE.
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.