Interface Privilege
jcr
namespace. Implementations may add additional privileges in namespaces other
than jcr.
A privilege may be an aggregate privilege. Aggregate privileges are sets of other privileges. Granting, denying, or testing an aggregate privilege is equivalent to individually granting, denying, or testing each privilege it contains. The privileges contained by an aggregate privilege may themselves be aggregate privileges if the resulting privilege graph is acyclic.
A privilege may be an abstract privilege. Abstract privileges cannot themselves be granted or denied, but can be composed into aggregate privileges which are granted or denied.
A privilege can be both aggregate and abstract.
- Since:
- JCR 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA constant representingjcr:addChildNodes(in expanded form), the privilege to create child nodes of a node.static final StringA constant representingjcr:all(in expanded form), an aggregate privilege that contains all predefined privileges.static final StringA constant representingjcr:lifecycleManagement(in expanded form), the privilege to perform lifecycle operations on a node.static final StringA constant representingjcr:lockManagement(in expanded form), the privilege to lock and unlock a node.static final StringA constant representingjcr:modifyAccessControl(in expanded form), the privilege to modify the access control policies of a node.static final StringA constant representingjcr:modifyProperties(in expanded form), the privilege to create, modify and remove the properties of a node.static final StringA constant representingjcr:nodeTypeManagement(in expanded form), the privilege to add and remove mixin node types and change the primary node type of a node.static final StringA constant representingjcr:read(in expanded form), the privilege to retrieve a node and get its properties and their values.static final StringA constant representingjcr:readAccessControl(in expanded form), the privilege to get the access control policy of a node.static final StringA constant representingjcr:removeChildNodes(in expanded form), the privilege to remove child nodes of a node.static final StringA constant representingjcr:removeNode(in expanded form), the privilege to remove a node.static final StringA constant representingjcr:retentionManagement(in expanded form), the privilege to perform retention management operations on a node.static final StringA constant representingjcr:versionManagement(in expanded form), the privilege to perform versioning operations on a node.static final StringA constant representingjcr:write(in expanded form), an aggregate privilege that contains:jcr:modifyPropertiesjcr:addChildNodesjcr:removeNodejcr:removeChildNodes -
Method Summary
Modifier and TypeMethodDescriptionIf this privilege is an aggregate privilege, returns the privileges it contains, the privileges contained by any aggregate privileges among those, and so on (the transitive closure of privileges contained by this privilege).If this privilege is an aggregate privilege, returns the privileges directly contained by the aggregate privilege.getName()Returns the name of this privilege.booleanReturns whether this privilege is an abstract privilege.booleanReturns whether this privilege is an aggregate privilege.
-
Field Details
-
JCR_READ
A constant representingjcr:read(in expanded form), the privilege to retrieve a node and get its properties and their values.- See Also:
-
JCR_MODIFY_PROPERTIES
A constant representingjcr:modifyProperties(in expanded form), the privilege to create, modify and remove the properties of a node.- See Also:
-
JCR_ADD_CHILD_NODES
A constant representingjcr:addChildNodes(in expanded form), the privilege to create child nodes of a node.- See Also:
-
JCR_REMOVE_NODE
A constant representingjcr:removeNode(in expanded form), the privilege to remove a node.In order to actually remove a node requires
jcr:removeNodeon that node andjcr:removeChildNodeson the parent node.The distinction is provided in order to reflect implementations that internally model "remove" as a "delete" instead of a "unlink". A repository that uses the "delete" model can have
jcr:removeChildNodesin every access control policy, so that removal is effectively controlled byjcr:removeNode.- See Also:
-
JCR_REMOVE_CHILD_NODES
A constant representingjcr:removeChildNodes(in expanded form), the privilege to remove child nodes of a node. In order to actually remove a node requiresjcr:removeNodeon that node andjcr:removeChildNodeson the parent node.The distinction is provided in order to reflect implementations that internally model "remove" as a "unlink" instead of a "delete". A repository that uses the "unlink" model can have
jcr:removeNodein every access control policy, so that removal is effectively controlled byjcr:removeChildNodes.- See Also:
-
JCR_WRITE
A constant representingjcr:write(in expanded form), an aggregate privilege that contains:jcr:modifyPropertiesjcr:addChildNodesjcr:removeNodejcr:removeChildNodes
- See Also:
-
JCR_READ_ACCESS_CONTROL
A constant representingjcr:readAccessControl(in expanded form), the privilege to get the access control policy of a node.- See Also:
-
JCR_MODIFY_ACCESS_CONTROL
A constant representingjcr:modifyAccessControl(in expanded form), the privilege to modify the access control policies of a node.- See Also:
-
JCR_LOCK_MANAGEMENT
A constant representingjcr:lockManagement(in expanded form), the privilege to lock and unlock a node.- See Also:
-
JCR_VERSION_MANAGEMENT
A constant representingjcr:versionManagement(in expanded form), the privilege to perform versioning operations on a node.- See Also:
-
JCR_NODE_TYPE_MANAGEMENT
A constant representingjcr:nodeTypeManagement(in expanded form), the privilege to add and remove mixin node types and change the primary node type of a node.- See Also:
-
JCR_RETENTION_MANAGEMENT
A constant representingjcr:retentionManagement(in expanded form), the privilege to perform retention management operations on a node.- See Also:
-
JCR_LIFECYCLE_MANAGEMENT
A constant representingjcr:lifecycleManagement(in expanded form), the privilege to perform lifecycle operations on a node.- See Also:
-
JCR_ALL
A constant representingjcr:all(in expanded form), an aggregate privilege that contains all predefined privileges.jcr:readjcr:writejcr:readAccessControljcr:modifyAccessControljcr:lockManagementjcr:versionManagementjcr:nodeTypeManagementjcr:retentionManagementjcr:lifecycleManagement
- See Also:
-
-
Method Details
-
getName
String getName()Returns the name of this privilege.Since the privilege name is a JCR name, it must be returned in qualified form, according to the prevailing namespace-to-prefix mapping in the current
Session(see the specification for details on JCR names).- Returns:
- the name of this privilege.
-
isAbstract
boolean isAbstract()Returns whether this privilege is an abstract privilege.- Returns:
trueif this privilege is an abstract privilege;falseotherwise.
-
isAggregate
boolean isAggregate()Returns whether this privilege is an aggregate privilege.- Returns:
trueif this privilege is an aggregate privilege;falseotherwise.
-
getDeclaredAggregatePrivileges
Privilege[] getDeclaredAggregatePrivileges()If this privilege is an aggregate privilege, returns the privileges directly contained by the aggregate privilege. Otherwise returns an empty array.- Returns:
- an array of
Privileges
-
getAggregatePrivileges
Privilege[] getAggregatePrivileges()If this privilege is an aggregate privilege, returns the privileges it contains, the privileges contained by any aggregate privileges among those, and so on (the transitive closure of privileges contained by this privilege). Otherwise returns an empty array.- Returns:
- an array of
Privileges
-