public final class Permissions
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
ADD_NODE |
static long |
ADD_PROPERTY |
static long |
ALL |
static long |
INDEX_DEFINITION_MANAGEMENT |
static long |
LIFECYCLE_MANAGEMENT |
static long |
LOCK_MANAGEMENT |
static long |
MODIFY_ACCESS_CONTROL |
static long |
MODIFY_CHILD_NODE_COLLECTION |
static long |
MODIFY_PROPERTY |
static long |
NAMESPACE_MANAGEMENT |
static long |
NO_PERMISSION |
static long |
NODE_TYPE_DEFINITION_MANAGEMENT |
static long |
NODE_TYPE_MANAGEMENT |
static java.util.Map<java.lang.Long,java.lang.String> |
PERMISSION_NAMES |
static long |
PRIVILEGE_MANAGEMENT |
static long |
READ |
static long |
READ_ACCESS_CONTROL |
static long |
READ_NODE |
static long |
READ_PROPERTY |
static long |
REMOVE |
static long |
REMOVE_NODE |
static long |
REMOVE_PROPERTY |
static long |
RETENTION_MANAGEMENT |
static long |
SET_PROPERTY |
static long |
USER_MANAGEMENT |
static long |
VERSION_MANAGEMENT |
static long |
WORKSPACE_MANAGEMENT |
static long |
WRITE |
Modifier and Type | Method and Description |
---|---|
static java.lang.Iterable<java.lang.Long> |
aggregates(long permissions) |
static long |
diff(long permissions,
long otherPermissions)
Returns those bits from
permissions that are not present in
the otherPermissions , i.e. |
static java.util.Set<java.lang.String> |
getNames(long permissions)
Returns names of the specified permissions.
|
static long |
getPermission(java.lang.String path,
long defaultPermission) |
static long |
getPermissions(java.lang.String permissionNames)
Returns the permissions that correspond the given permission names.
|
static long |
getPermissions(java.lang.String jcrActions,
TreeLocation location,
boolean isAccessControlContent)
Returns the permissions that correspond the given jcr actions such as
specified in
Session#hasPermission(String, String) . |
static java.lang.String |
getString(long permissions)
Returns the names of the specified permissions separated by ','.
|
static boolean |
includes(long permissions,
long permissionsToTest) |
static boolean |
isAggregate(long permission) |
static boolean |
isRepositoryPermission(long permission) |
static boolean |
respectParentPermissions(long permissions) |
public static final long NO_PERMISSION
public static final long READ_NODE
public static final long READ_PROPERTY
public static final long ADD_PROPERTY
public static final long MODIFY_PROPERTY
public static final long REMOVE_PROPERTY
public static final long ADD_NODE
public static final long REMOVE_NODE
public static final long READ_ACCESS_CONTROL
public static final long MODIFY_ACCESS_CONTROL
public static final long NODE_TYPE_MANAGEMENT
public static final long VERSION_MANAGEMENT
public static final long LOCK_MANAGEMENT
public static final long LIFECYCLE_MANAGEMENT
public static final long RETENTION_MANAGEMENT
public static final long MODIFY_CHILD_NODE_COLLECTION
public static final long NODE_TYPE_DEFINITION_MANAGEMENT
public static final long NAMESPACE_MANAGEMENT
public static final long WORKSPACE_MANAGEMENT
public static final long PRIVILEGE_MANAGEMENT
public static final long USER_MANAGEMENT
public static final long INDEX_DEFINITION_MANAGEMENT
public static final long READ
public static final long REMOVE
public static final long SET_PROPERTY
public static final long WRITE
public static final long ALL
public static final java.util.Map<java.lang.Long,java.lang.String> PERMISSION_NAMES
public static java.util.Set<java.lang.String> getNames(long permissions)
permissions
- The permissions for which the string representation
should be collected.public static java.lang.String getString(long permissions)
permissions
- The permissions for which the string representation
should be collected.Session#hasPermission(String, String)
and Session#checkPermission(String, String)
.public static boolean isRepositoryPermission(long permission)
public static boolean isAggregate(long permission)
public static java.lang.Iterable<java.lang.Long> aggregates(long permissions)
public static boolean includes(long permissions, long permissionsToTest)
public static boolean respectParentPermissions(long permissions)
public static long diff(long permissions, long otherPermissions)
permissions
that are not present in
the otherPermissions
, i.e. subtracts the other permissions
from permissions.otherPermissions
do not intersect with
permissions
, permissions
are returned.permissions
is included in otherPermissions
,
NO_PERMISSION
is returned.permissions
- otherPermissions
- NO_PERMISSION
.public static long getPermissions(java.lang.String jcrActions, TreeLocation location, boolean isAccessControlContent)
Session#hasPermission(String, String)
. Note that
in addition to the regular JCR actions (Session#ACTION_READ
,
Session#ACTION_ADD_NODE
, Session#ACTION_REMOVE
and
Session#ACTION_SET_PROPERTY
) the string may also contain
the names of all permissions defined by this class.jcrActions
- A comma separated string of JCR actions and permission
names.location
- The tree location for which the permissions should be
calculated.isAccessControlContent
- Flag to mark the given location as access
control content.java.lang.IllegalArgumentException
- If the string contains unknown actions
or permission names.public static long getPermissions(java.lang.String permissionNames)
permissionNames
- A comma separated string of permission names.java.lang.IllegalArgumentException
- If the string contains unknown actions
or permission names.public static long getPermission(java.lang.String path, long defaultPermission)
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"