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 void
checkInitialized()
Check if this manager has been properly initialized.protected abstract void
checkPermission(String absPath, int permission)
Check if the specified privileges are granted atabsPath
.protected abstract void
checkValidNodePath(String absPath)
Tests if the givenabsPath
is absolute and points to an existing node.AccessControlPolicyIterator
getApplicablePolicies(String absPath)
Returns an empty iterator.JackrabbitAccessControlPolicy[]
getApplicablePolicies(Principal principal)
AccessControlPolicy[]
getPolicies(String absPath)
Returnsnull
.JackrabbitAccessControlPolicy[]
getPolicies(Principal principal)
protected abstract PrivilegeManager
getPrivilegeManager()
Privilege[]
getSupportedPrivileges(String absPath)
Always returns all registeredPrivilege
s.Privilege
privilegeFromName(String privilegeName)
void
removePolicy(String absPath, AccessControlPolicy policy)
Always throwsAccessControlException
void
setPolicy(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 registeredPrivilege
s.- Specified by:
getSupportedPrivileges
in interfaceAccessControlManager
- Parameters:
absPath
- Path to an existing node.- Returns:
- Always returns all registered
Privilege
s. - Throws:
PathNotFoundException
RepositoryException
- See Also:
AccessControlManager.getSupportedPrivileges(String)
-
privilegeFromName
public Privilege privilegeFromName(String privilegeName) throws AccessControlException, RepositoryException
- Specified by:
privilegeFromName
in interfaceAccessControlManager
- Throws:
AccessControlException
RepositoryException
- See Also:
AccessControlManager.privilegeFromName(String)
-
getPolicies
public AccessControlPolicy[] getPolicies(String absPath) throws PathNotFoundException, AccessDeniedException, RepositoryException
Returnsnull
.- Specified by:
getPolicies
in interfaceAccessControlManager
- Parameters:
absPath
- Path to an existing node.- Returns:
- always returns
null
. - Throws:
PathNotFoundException
AccessDeniedException
RepositoryException
- See Also:
AccessControlManager.getApplicablePolicies(String)
-
getApplicablePolicies
public AccessControlPolicyIterator getApplicablePolicies(String absPath) throws PathNotFoundException, AccessDeniedException, RepositoryException
Returns an empty iterator.- Specified by:
getApplicablePolicies
in interfaceAccessControlManager
- Parameters:
absPath
- Path to an existing node.- Returns:
- always returns an empty iterator.
- Throws:
PathNotFoundException
AccessDeniedException
RepositoryException
- See Also:
AccessControlManager.getApplicablePolicies(String)
-
setPolicy
public void setPolicy(String absPath, AccessControlPolicy policy) throws PathNotFoundException, AccessControlException, AccessDeniedException, RepositoryException
Always throwsAccessControlException
- Specified by:
setPolicy
in interfaceAccessControlManager
- Throws:
PathNotFoundException
AccessControlException
AccessDeniedException
RepositoryException
- See Also:
AccessControlManager.setPolicy(String, AccessControlPolicy)
-
removePolicy
public void removePolicy(String absPath, AccessControlPolicy policy) throws PathNotFoundException, AccessControlException, AccessDeniedException, RepositoryException
Always throwsAccessControlException
- Specified by:
removePolicy
in interfaceAccessControlManager
- Throws:
PathNotFoundException
AccessControlException
AccessDeniedException
RepositoryException
- 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 IllegalStateException
Check 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 atabsPath
of 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 givenabsPath
is absolute and points to an existing node.- Parameters:
absPath
- Path to an existing node.- Throws:
PathNotFoundException
- if no node atabsPath
exists or the session does not have privilege to retrieve the node.RepositoryException
- If the givenabsPath
is not absolute or if some other error occurs.
-
-