public abstract class AbstractAccessControlManager extends Object implements JackrabbitAccessControlManager
AbstractAccessControlManager
...Constructor and Description |
---|
AbstractAccessControlManager() |
Modifier and Type | Method and 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 at
absPath . |
protected abstract void |
checkValidNodePath(String absPath)
Tests if the given
absPath is absolute and points to an existing node. |
JackrabbitAccessControlPolicy[] |
getApplicablePolicies(Principal principal)
Returns the applicable policies for the specified
principal
or an empty array if no additional policies can be applied. |
AccessControlPolicyIterator |
getApplicablePolicies(String absPath)
Returns an empty iterator.
|
JackrabbitAccessControlPolicy[] |
getPolicies(Principal principal)
Returns the
AccessControlPolicy objects that have been set
for the given principal or an empty array if no policy has
been set. |
AccessControlPolicy[] |
getPolicies(String absPath)
Returns
null . |
protected abstract PrivilegeManager |
getPrivilegeManager() |
Privilege[] |
getSupportedPrivileges(String absPath)
Always returns all registered
Privilege s. |
Privilege |
privilegeFromName(String privilegeName) |
void |
removePolicy(String absPath,
AccessControlPolicy policy)
Always throws
AccessControlException |
void |
setPolicy(String absPath,
AccessControlPolicy policy)
Always throws
AccessControlException |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEffectivePolicies, getPrivileges, hasPrivileges
getEffectivePolicies, getPrivileges, hasPrivileges
public Privilege[] getSupportedPrivileges(String absPath) throws PathNotFoundException, RepositoryException
Privilege
s.getSupportedPrivileges
in interface AccessControlManager
absPath
- Path to an existing node.Privilege
s.PathNotFoundException
RepositoryException
AccessControlManager.getSupportedPrivileges(String)
public Privilege privilegeFromName(String privilegeName) throws AccessControlException, RepositoryException
privilegeFromName
in interface AccessControlManager
AccessControlException
RepositoryException
AccessControlManager.privilegeFromName(String)
public AccessControlPolicy[] getPolicies(String absPath) throws PathNotFoundException, AccessDeniedException, RepositoryException
null
.getPolicies
in interface AccessControlManager
absPath
- Path to an existing node.null
.PathNotFoundException
AccessDeniedException
RepositoryException
AccessControlManager.getApplicablePolicies(String)
public AccessControlPolicyIterator getApplicablePolicies(String absPath) throws PathNotFoundException, AccessDeniedException, RepositoryException
getApplicablePolicies
in interface AccessControlManager
absPath
- Path to an existing node.PathNotFoundException
AccessDeniedException
RepositoryException
AccessControlManager.getApplicablePolicies(String)
public void setPolicy(String absPath, AccessControlPolicy policy) throws PathNotFoundException, AccessControlException, AccessDeniedException, RepositoryException
AccessControlException
setPolicy
in interface AccessControlManager
PathNotFoundException
AccessControlException
AccessDeniedException
RepositoryException
AccessControlManager.setPolicy(String, AccessControlPolicy)
public void removePolicy(String absPath, AccessControlPolicy policy) throws PathNotFoundException, AccessControlException, AccessDeniedException, RepositoryException
AccessControlException
removePolicy
in interface AccessControlManager
PathNotFoundException
AccessControlException
AccessDeniedException
RepositoryException
AccessControlManager.removePolicy(String, AccessControlPolicy)
public JackrabbitAccessControlPolicy[] getApplicablePolicies(Principal principal) throws AccessDeniedException, AccessControlException, UnsupportedRepositoryOperationException, RepositoryException
JackrabbitAccessControlManager
principal
or an empty array if no additional policies can be applied.getApplicablePolicies
in interface JackrabbitAccessControlManager
principal
- A principal known to the editing session.principal
. Note
that the policy object returned must reveal the path of the node where
they can be applied later on using AccessControlManager.setPolicy(String, javax.jcr.security.AccessControlPolicy)
.AccessDeniedException
- if the session lacks
MODIFY_ACCESS_CONTROL
privilege.AccessControlException
- if the specified principal does not exist
or if another access control related exception occurs.UnsupportedRepositoryOperationException
- if editing access control
policies by principal is not supported.RepositoryException
- if another error occurs.JackrabbitAccessControlManager.getApplicablePolicies(java.security.Principal)
public JackrabbitAccessControlPolicy[] getPolicies(Principal principal) throws AccessDeniedException, AccessControlException, UnsupportedRepositoryOperationException, RepositoryException
JackrabbitAccessControlManager
AccessControlPolicy
objects that have been set
for the given principal
or an empty array if no policy has
been set. This method reflects the binding state, including transient
policy modifications.getPolicies
in interface JackrabbitAccessControlManager
principal
- A valid principal.AccessDeniedException
- if the session lacks
READ_ACCESS_CONTROL
privilege.AccessControlException
- if the specified principal does not exist
or if another access control related exception occurs.UnsupportedRepositoryOperationException
- if editing access control
policies by principal is not supported.RepositoryException
- If another error occurs.JackrabbitAccessControlManager.getPolicies(java.security.Principal)
protected abstract void checkInitialized() throws IllegalStateException
IllegalStateException
- If this manager has not been properly initialized.protected abstract void checkPermission(String absPath, int permission) throws AccessDeniedException, PathNotFoundException, RepositoryException
absPath
.absPath
- Path to an existing node.permission
- Permissions to be checked.AccessDeniedException
- if the session does not have the
specified privileges.PathNotFoundException
- if no node exists at absPath
of if the session does not have the permission to READ it.RepositoryException
- If another error occurs.protected abstract PrivilegeManager getPrivilegeManager() throws RepositoryException
RepositoryException
- If another error occurs.protected abstract void checkValidNodePath(String absPath) throws PathNotFoundException, RepositoryException
absPath
is absolute and points to an existing node.absPath
- Path to an existing node.PathNotFoundException
- if no node at absPath
exists
or the session does not have privilege to retrieve the node.RepositoryException
- If the given absPath
is not
absolute or if some other error occurs.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.