|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AccessControlProvider
The AccessControlProvider is used to provide access control policy and entry
objects that apply to an item in a single workspace. The provider is bound
to a system session in contrast to the AccessControlManager
that
is bound to a specific session/subject.
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
Method Summary | |
---|---|
boolean |
canAccessRoot(Set 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 principals)
Compiles the effective policy for the specified set of Principal s. |
AccessControlEditor |
getEditor(Session session)
Returns an AccessControlEditor for the given Session object
or null if the implementation does not support editing
of access control policies. |
AccessControlPolicy[] |
getEffectivePolicies(Path absPath)
Returns the effective policies for the node at the given absPath. |
void |
init(Session systemSession,
Map configuration)
Allows the AccessControlProviderFactory to pass a session
and configuration parameters to the AccessControlProvider . |
Method Detail |
---|
void init(Session systemSession, Map configuration) throws RepositoryException
AccessControlProviderFactory
to pass a session
and configuration parameters to the AccessControlProvider
.
systemSession
- System session.configuration
- Configuration used to initialize this provider.
RepositoryException
- If an error occurs.void close()
AccessControlPolicy[] getEffectivePolicies(Path absPath) throws ItemNotFoundException, RepositoryException
absPath
- an absolute path.
absPath
or
an empty array if the implementation cannot determine the effective
policy at the given path.
ItemNotFoundException
- If no Node with the specified
absPath
exists.
RepositoryException
- If another error occurs.AccessControlManager.getEffectivePolicies(String)
AccessControlEditor getEditor(Session session) throws 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
.
RepositoryException
- If an error occurs.CompiledPermissions compilePermissions(Set principals) throws RepositoryException
Principal
s.
principals
- Set of principals to compile the permissions for. If
the order of evaluating permissions for principals is meaningful, the
caller is adviced to pass a Set that respects the order of insertion.
RepositoryException
- If an error occurs.boolean canAccessRoot(Set principals) throws 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.
RepositoryException
- If an error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |