org.apache.jackrabbit.core.security.authorization
Class AbstractACLTemplate
java.lang.Object
org.apache.jackrabbit.core.security.authorization.AbstractACLTemplate
- All Implemented Interfaces:
- AccessControlList, AccessControlPolicy, org.apache.jackrabbit.api.security.JackrabbitAccessControlList, org.apache.jackrabbit.api.security.JackrabbitAccessControlPolicy, AccessControlConstants
public abstract class AbstractACLTemplate
- extends Object
- implements org.apache.jackrabbit.api.security.JackrabbitAccessControlList, AccessControlConstants
AbstractACLTemplate...
| Fields inherited from interface org.apache.jackrabbit.core.security.authorization.AccessControlConstants |
N_ACCESSCONTROL, N_POLICY, N_REPO_POLICY, 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, NT_REP_REPO_ACCESS_CONTROLLABLE, P_GLOB, P_PRINCIPAL_NAME, P_PRIVILEGES |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.jackrabbit.api.security.JackrabbitAccessControlList |
addEntry, getRestrictionNames, getRestrictionType |
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 privileges are allowed or denied.restrictions - The additional restrictions.
- Throws:
AccessControlException - If any of the given parameters is invalid.
getEntries
protected abstract List<AccessControlEntry> getEntries()
- Return the list of entries, if they are held in an orderable list.
- Returns:
- the list of entries.
- See Also:
orderBefore(AccessControlEntry, AccessControlEntry)
getPath
public String getPath()
- Specified by:
getPath in interface org.apache.jackrabbit.api.security.JackrabbitAccessControlPolicy
- See Also:
JackrabbitAccessControlPolicy.getPath()
addEntry
public boolean addEntry(Principal principal,
Privilege[] privileges,
boolean isAllow)
throws AccessControlException,
RepositoryException
- Specified by:
addEntry in interface org.apache.jackrabbit.api.security.JackrabbitAccessControlList
- Throws:
AccessControlException
RepositoryException- See Also:
JackrabbitAccessControlList.addEntry(Principal, Privilege[], boolean)
size
public int size()
- Specified by:
size in interface org.apache.jackrabbit.api.security.JackrabbitAccessControlList
- See Also:
JackrabbitAccessControlList.size()
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface org.apache.jackrabbit.api.security.JackrabbitAccessControlList
- See Also:
JackrabbitAccessControlList.isEmpty()
orderBefore
public void orderBefore(AccessControlEntry srcEntry,
AccessControlEntry destEntry)
throws AccessControlException,
UnsupportedRepositoryOperationException,
RepositoryException
- Specified by:
orderBefore in interface org.apache.jackrabbit.api.security.JackrabbitAccessControlList
- Throws:
AccessControlException
UnsupportedRepositoryOperationException
RepositoryException- See Also:
JackrabbitAccessControlList.orderBefore(javax.jcr.security.AccessControlEntry, javax.jcr.security.AccessControlEntry)
getAccessControlEntries
public AccessControlEntry[] getAccessControlEntries()
throws RepositoryException
- Specified by:
getAccessControlEntries in interface AccessControlList
- Throws:
RepositoryException- See Also:
AccessControlList.getAccessControlEntries()
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-2012 The Apache Software Foundation. All Rights Reserved.