Class AbstractAccessControlManager
- java.lang.Object
-
- org.apache.jackrabbit.core.security.AbstractAccessControlManager
-
- All Implemented Interfaces:
AccessControlManager,JackrabbitAccessControlManager
- Direct Known Subclasses:
DefaultAccessManager,SimpleAccessManager
public abstract class AbstractAccessControlManager extends Object implements JackrabbitAccessControlManager
AbstractAccessControlManager...
-
-
Constructor Summary
Constructors Constructor Description AbstractAccessControlManager()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidcheckInitialized()Check if this manager has been properly initialized.protected abstract voidcheckPermission(String absPath, int permission)Check if the specified privileges are granted atabsPath.protected abstract voidcheckValidNodePath(String absPath)Tests if the givenabsPathis absolute and points to an existing node.AccessControlPolicyIteratorgetApplicablePolicies(String absPath)Returns an empty iterator.JackrabbitAccessControlPolicy[]getApplicablePolicies(Principal principal)AccessControlPolicy[]getPolicies(String absPath)Returnsnull.JackrabbitAccessControlPolicy[]getPolicies(Principal principal)protected abstract PrivilegeManagergetPrivilegeManager()Privilege[]getSupportedPrivileges(String absPath)Always returns all registeredPrivileges.PrivilegeprivilegeFromName(String privilegeName)voidremovePolicy(String absPath, AccessControlPolicy policy)Always throwsAccessControlExceptionvoidsetPolicy(String absPath, AccessControlPolicy policy)Always throwsAccessControlException-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface javax.jcr.security.AccessControlManager
getEffectivePolicies, getPrivileges, hasPrivileges
-
Methods inherited from interface org.apache.jackrabbit.api.security.JackrabbitAccessControlManager
getEffectivePolicies, getEffectivePolicies, getPrivilegeCollection, getPrivilegeCollection, getPrivileges, hasPrivileges, privilegeCollectionFromNames
-
-
-
-
Method Detail
-
getSupportedPrivileges
public Privilege[] getSupportedPrivileges(String absPath) throws PathNotFoundException, RepositoryException
Always returns all registeredPrivileges.- Specified by:
getSupportedPrivilegesin interfaceAccessControlManager- Parameters:
absPath- Path to an existing node.- Returns:
- Always returns all registered
Privileges. - Throws:
PathNotFoundExceptionRepositoryException- See Also:
AccessControlManager.getSupportedPrivileges(String)
-
privilegeFromName
public Privilege privilegeFromName(String privilegeName) throws AccessControlException, RepositoryException
- Specified by:
privilegeFromNamein interfaceAccessControlManager- Throws:
AccessControlExceptionRepositoryException- See Also:
AccessControlManager.privilegeFromName(String)
-
getPolicies
public AccessControlPolicy[] getPolicies(String absPath) throws PathNotFoundException, AccessDeniedException, RepositoryException
Returnsnull.- Specified by:
getPoliciesin interfaceAccessControlManager- Parameters:
absPath- Path to an existing node.- Returns:
- always returns
null. - Throws:
PathNotFoundExceptionAccessDeniedExceptionRepositoryException- See Also:
AccessControlManager.getApplicablePolicies(String)
-
getApplicablePolicies
public AccessControlPolicyIterator getApplicablePolicies(String absPath) throws PathNotFoundException, AccessDeniedException, RepositoryException
Returns an empty iterator.- Specified by:
getApplicablePoliciesin interfaceAccessControlManager- Parameters:
absPath- Path to an existing node.- Returns:
- always returns an empty iterator.
- Throws:
PathNotFoundExceptionAccessDeniedExceptionRepositoryException- See Also:
AccessControlManager.getApplicablePolicies(String)
-
setPolicy
public void setPolicy(String absPath, AccessControlPolicy policy) throws PathNotFoundException, AccessControlException, AccessDeniedException, RepositoryException
Always throwsAccessControlException- Specified by:
setPolicyin interfaceAccessControlManager- Throws:
PathNotFoundExceptionAccessControlExceptionAccessDeniedExceptionRepositoryException- See Also:
AccessControlManager.setPolicy(String, AccessControlPolicy)
-
removePolicy
public void removePolicy(String absPath, AccessControlPolicy policy) throws PathNotFoundException, AccessControlException, AccessDeniedException, RepositoryException
Always throwsAccessControlException- Specified by:
removePolicyin interfaceAccessControlManager- Throws:
PathNotFoundExceptionAccessControlExceptionAccessDeniedExceptionRepositoryException- See Also:
AccessControlManager.removePolicy(String, AccessControlPolicy)
-
getApplicablePolicies
public JackrabbitAccessControlPolicy[] getApplicablePolicies(Principal principal) throws AccessDeniedException, AccessControlException, UnsupportedRepositoryOperationException, RepositoryException
-
getPolicies
public JackrabbitAccessControlPolicy[] getPolicies(Principal principal) throws AccessDeniedException, AccessControlException, UnsupportedRepositoryOperationException, RepositoryException
-
checkInitialized
protected abstract void checkInitialized() throws IllegalStateExceptionCheck if this manager has been properly initialized.- Throws:
IllegalStateException- If this manager has not been properly initialized.
-
checkPermission
protected abstract void checkPermission(String absPath, int permission) throws AccessDeniedException, PathNotFoundException, RepositoryException
Check if the specified privileges are granted atabsPath.- Parameters:
absPath- Path to an existing node.permission- Permissions to be checked.- Throws:
AccessDeniedException- if the session does not have the specified privileges.PathNotFoundException- if no node exists atabsPathof if the session does not have the permission to READ it.RepositoryException- If another error occurs.
-
getPrivilegeManager
protected abstract PrivilegeManager getPrivilegeManager() throws RepositoryException
- Returns:
- the privilege manager
- Throws:
RepositoryException- If another error occurs.
-
checkValidNodePath
protected abstract void checkValidNodePath(String absPath) throws PathNotFoundException, RepositoryException
Tests if the givenabsPathis absolute and points to an existing node.- Parameters:
absPath- Path to an existing node.- Throws:
PathNotFoundException- if no node atabsPathexists or the session does not have privilege to retrieve the node.RepositoryException- If the givenabsPathis not absolute or if some other error occurs.
-
-