org.apache.jackrabbit.core.security.authorization
Class AbstractACLTemplate
java.lang.Object
org.apache.jackrabbit.core.security.authorization.AbstractACLTemplate
- All Implemented Interfaces:
- AccessControlList, AccessControlPolicy, JackrabbitAccessControlList, JackrabbitAccessControlPolicy, AccessControlConstants
public abstract class AbstractACLTemplate
- extends Object
- implements JackrabbitAccessControlList, AccessControlConstants
AbstractACLTemplate...
| 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, NT_REP_PRINCIPAL_ACCESS_CONTROL, P_PRINCIPAL_NAME, P_PRIVILEGES |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
path
protected final String path
- Path of the node this ACL template has been created for.
valueFactory
protected final ValueFactory valueFactory
- The value factory
AbstractACLTemplate
protected AbstractACLTemplate(String path,
ValueFactory valueFactory)
checkValidEntry
protected abstract void checkValidEntry(Principal principal,
Privilege[] privileges,
boolean isAllow,
Map<String,Value> restrictions)
throws AccessControlException
- Validates the given parameters to create a new ACE and throws an
AccessControlException if any of them is invalid. Otherwise
this method returns silently.
- Parameters:
principal - The principal to create the ACE for.privileges - The privileges to be granted/denied by the ACE.isAllow - Defines if the priveleges are allowed or denied.restrictions - The additional restrictions.
- Throws:
AccessControlException - If any of the given params is invalid.
getEntries
protected abstract List<? extends AccessControlEntry> getEntries()
throws UnsupportedRepositoryOperationException,
RepositoryException
- Return the list of entries, if they are held in a orderable list.
- Returns:
- the list of entries.
- Throws:
UnsupportedRepositoryOperationException - If the implementation
does not held the entries in a list.
RepositoryException- See Also:
orderBefore(AccessControlEntry, AccessControlEntry)
getPath
public String getPath()
- Specified by:
getPath in interface JackrabbitAccessControlPolicy
- See Also:
JackrabbitAccessControlPolicy.getPath()
addEntry
public boolean addEntry(Principal principal,
Privilege[] privileges,
boolean isAllow)
throws AccessControlException,
RepositoryException
- Specified by:
addEntry in interface JackrabbitAccessControlList
- Throws:
AccessControlException
RepositoryException- See Also:
JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean)
orderBefore
public void orderBefore(AccessControlEntry srcEntry,
AccessControlEntry destEntry)
throws AccessControlException,
UnsupportedRepositoryOperationException,
RepositoryException
- Specified by:
orderBefore in interface JackrabbitAccessControlList
- Parameters:
srcEntry - The access control entry to be moved within the list.destEntry - The entry before which the srcEntry will be moved.
- Throws:
AccessControlException
UnsupportedRepositoryOperationException
RepositoryException
addAccessControlEntry
public boolean addAccessControlEntry(Principal principal,
Privilege[] privileges)
throws AccessControlException,
RepositoryException
- Specified by:
addAccessControlEntry in interface AccessControlList
- Throws:
AccessControlException
RepositoryException- See Also:
AccessControlList.addAccessControlEntry(java.security.Principal , javax.jcr.security.Privilege[])
Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.