public interface AccessControlProvider
AccessControlManager
that
is bound to a specific session/subject.
Please note following additional special conditions:
AccessControlProvider
.ItemNotFoundException
will be thrown. It is
therefore recommended to evaluate the id of the closest not-new ancestor
node before calling any methods on the provider.AccessControlEditor
are not effective unless
they are persisted by calling Session.save()
on the session
that has been used to obtain the editor.AccessControlProviderFactory
Modifier and Type | Method and Description |
---|---|
boolean |
canAccessRoot(Set<Principal> principals)
Returns
true if the given set of principals can access the
root node of the workspace this provider has been built for;
false otherwise. |
void |
close()
Closes this provider when it is no longer used by the respective
workspace and release resources bound by this provider.
|
CompiledPermissions |
compilePermissions(Set<Principal> principals)
Compiles the effective policy for the specified set of
Principal s. |
AccessControlEditor |
getEditor(javax.jcr.Session session)
Returns an
AccessControlEditor for the given Session object
or null if the implementation does not support editing
of access control policies. |
javax.jcr.security.AccessControlPolicy[] |
getEffectivePolicies(Path absPath,
CompiledPermissions permissions)
Returns the effective policies for the node at the given absPath.
|
javax.jcr.security.AccessControlPolicy[] |
getEffectivePolicies(Set<Principal> principals,
CompiledPermissions permissions)
Returns the effective policies for the given principals.
|
void |
init(javax.jcr.Session systemSession,
Map configuration)
Allows the
AccessControlProviderFactory to pass a session
and configuration parameters to the AccessControlProvider . |
boolean |
isLive()
Returns
true , if this provider is still alive and able to
evaluate permissions; false otherwise. |
void init(javax.jcr.Session systemSession, Map configuration) throws javax.jcr.RepositoryException
AccessControlProviderFactory
to pass a session
and configuration parameters to the AccessControlProvider
.systemSession
- System session.configuration
- Configuration used to initialize this provider.javax.jcr.RepositoryException
- If an error occurs.void close()
boolean isLive()
true
, if this provider is still alive and able to
evaluate permissions; false
otherwise.true
, if this provider is still alive and able to
evaluate permissions; false
otherwise.javax.jcr.security.AccessControlPolicy[] getEffectivePolicies(Path absPath, CompiledPermissions permissions) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
absPath
- an absolute path.permissions
- The effective permissions of the editing
sessions that attempts to view the effective policies.absPath
or
an empty array if the implementation cannot determine the effective
policy at the given path.javax.jcr.ItemNotFoundException
- If no Node with the specified
absPath
exists.javax.jcr.RepositoryException
- If another error occurs.AccessControlManager.getEffectivePolicies(String)
javax.jcr.security.AccessControlPolicy[] getEffectivePolicies(Set<Principal> principals, CompiledPermissions permissions) throws javax.jcr.RepositoryException
principals
- A set of principal.permissions
- The effective permissions of the editing
sessions that attempts to view the effective policies. @return The effective policies that are in effect for the given
principal
or an empty array.javax.jcr.RepositoryException
- If error occurs.JackrabbitAccessControlManager.getEffectivePolicies(Set)
AccessControlEditor getEditor(javax.jcr.Session session) throws javax.jcr.RepositoryException
AccessControlEditor
for the given Session object
or null
if the implementation does not support editing
of access control policies.session
- The editing session.null
.javax.jcr.RepositoryException
- If an error occurs.CompiledPermissions compilePermissions(Set<Principal> principals) throws javax.jcr.RepositoryException
Principal
s.principals
- Set of principals to compile the permissions for. If
the order of evaluating permissions for principals is meaningful, the
caller should pass a Set that respects the order of insertion.javax.jcr.RepositoryException
- If an error occurs.boolean canAccessRoot(Set<Principal> principals) throws javax.jcr.RepositoryException
true
if the given set of principals can access the
root node of the workspace this provider has been built for;
false
otherwise.principals
- Set of principals to be tested for being allowed to
access the root node.true
if the given set of principals can access the
root node of the workspace this provider has been built for;
false
otherwise.javax.jcr.RepositoryException
- If an error occurs.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.