|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.SecurityItemModifier
org.apache.jackrabbit.core.security.authorization.acl.ACLEditor
public class ACLEditor
ACLEditor...
| Field Summary |
|---|
| Fields inherited from interface org.apache.jackrabbit.core.security.authorization.AccessControlConstants |
|---|
N_ACCESSCONTROL, N_POLICY, NF, NT_REP_ACCESS_CONTROL, NT_REP_ACCESS_CONTROLLABLE, NT_REP_ACE, NT_REP_ACL, NT_REP_DENY_ACE, NT_REP_GRANT_ACE, P_PRINCIPAL_NAME, P_PRIVILEGES |
| Method Summary | |
|---|---|
AccessControlPolicy[] |
editAccessControlPolicies(java.security.Principal principal)
Returns an array of editable policies for the given principal. |
AccessControlPolicy[] |
editAccessControlPolicies(java.lang.String nodePath)
Retrieves the editable policies for the Node identified by the given nodePath. |
AccessControlPolicy[] |
getPolicies(java.lang.String nodePath)
Retrieves the policies for the Node identified by the given nodePath. |
protected static Name |
getUniqueNodeName(javax.jcr.Node node,
java.lang.String name)
Create a unique valid name for the Permission nodes to be save. |
void |
removePolicy(java.lang.String nodePath,
AccessControlPolicy policy)
Removes the specified policy from the node at nodePath. |
void |
setPolicy(java.lang.String nodePath,
AccessControlPolicy policy)
Stores the policy template to the respective node. |
| Methods inherited from class org.apache.jackrabbit.core.SecurityItemModifier |
|---|
addSecurityNode, removeSecurityItem, setSecurityProperty, setSecurityProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public AccessControlPolicy[] getPolicies(java.lang.String nodePath)
throws AccessControlException,
javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
AccessControlEditornodePath. In contrast to AccessControlEditor.editAccessControlPolicies(java.lang.String) this method
returns an empty array if no policy has been applied before by calling
AccessControlEditor.setPolicy(java.lang.String, org.apache.jackrabbit.api.jsr283.security.AccessControlPolicy)). Still the returned policies are detached from
the AccessControlProvider and are only an external representation.
Modification will therefore not take effect, until they are written back to
the editor and persisted.
Compared to the policy returned by AccessControlProvider.getEffectivePolicies(org.apache.jackrabbit.spi.Path),
the scope of the policies it limited to the Node itself and does
not take inherited elements into account.
getPolicies in interface AccessControlEditornodePath -
AccessControlException - If the Node identified by the given
nodePath does not allow access control modifications (e.g.
the node itself stores the access control information for its parent).
javax.jcr.PathNotFoundException - if no node exists for the given
nodePath.
javax.jcr.RepositoryException - if an error occursAccessControlEditor.getPolicies(String)
public AccessControlPolicy[] editAccessControlPolicies(java.lang.String nodePath)
throws AccessControlException,
javax.jcr.PathNotFoundException,
javax.jcr.RepositoryException
AccessControlEditornodePath. If the node does not yet have any policy set an
new (empty) 'template' is created (see also AccessControlEditor.getPolicies(String).AccessControlProvider and is only an external
representation. Modification will therefore not take effect, until a
modified policy is written back to the editor and persisted.
Compared to the policies returned by AccessControlProvider.getEffectivePolicies(org.apache.jackrabbit.spi.Path),
the scope of the policies returned by this methods it limited to the Node
itself and does never not take inherited elements into account.
editAccessControlPolicies in interface AccessControlEditornodePath -
AccessControlException - If the Node identified by the given
nodePath does not allow access control modifications.
javax.jcr.PathNotFoundException - if no node exists for the given
nodePath.
javax.jcr.RepositoryException - if an error occursAccessControlEditor.editAccessControlPolicies(String)
public AccessControlPolicy[] editAccessControlPolicies(java.security.Principal principal)
throws javax.jcr.AccessDeniedException,
AccessControlException,
javax.jcr.RepositoryException
AccessControlEditorprincipal.
editAccessControlPolicies in interface AccessControlEditorprincipal.
AccessControlException - if the specified principal does not exist,
if this implementation cannot provide policies for individual principals or
if same other access control related exception occurs.
javax.jcr.RepositoryException - if another error occurs.
javax.jcr.AccessDeniedExceptionAccessControlEditor.editAccessControlPolicies(Principal)
public void setPolicy(java.lang.String nodePath,
AccessControlPolicy policy)
throws javax.jcr.RepositoryException
AccessControlEditor
setPolicy in interface AccessControlEditornodePath - Absolute path to an existing node object.policy - the AccessControlPolicy to store.
AccessControlException - If the policy is null or
if it is not applicable to the Node identified by the given
nodePath.
javax.jcr.PathNotFoundException - if no node exists for the given
nodePath.
javax.jcr.RepositoryException - if an other error occurs.AccessControlEditor.setPolicy(String,AccessControlPolicy)
public void removePolicy(java.lang.String nodePath,
AccessControlPolicy policy)
throws AccessControlException,
javax.jcr.RepositoryException
AccessControlEditornodePath.
removePolicy in interface AccessControlEditornodePath - Absolute path to an existing node object.policy - The policy to be removed at nodePath.
AccessControlException - If the Node identified by the given
nodePath does not allow policy modifications or does not have
the specified policy attached.
javax.jcr.PathNotFoundException - if no node exists for the given
nodePath.
javax.jcr.RepositoryException - if an other error occursAccessControlEditor.removePolicy(String,AccessControlPolicy)
protected static Name getUniqueNodeName(javax.jcr.Node node,
java.lang.String name)
throws javax.jcr.RepositoryException
node - a name for the child is resolvedname - if missing the DEFAULT_ACE_NAME is taken
javax.jcr.RepositoryException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||