|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.security.authorization.AbstractAccessControlProvider
public abstract class AbstractAccessControlProvider
AbstractAccessControlProvider
...
Field Summary | |
---|---|
protected ObservationManager |
observationMgr
|
static String |
PARAM_OMIT_DEFAULT_PERMISSIONS
|
protected NamePathResolver |
resolver
|
protected SessionImpl |
session
the system session this provider has been created for. |
Constructor Summary | |
---|---|
protected |
AbstractAccessControlProvider()
|
Method Summary | |
---|---|
protected void |
checkInitialized()
Throws IllegalStateException if the provider has not
been initialized or has been closed. |
void |
close()
Closes this provider when it is no longer used by the respective workspace and release resources bound by this provider. |
protected static CompiledPermissions |
getAdminPermissions()
Returns compiled permissions for the administrator i.e. permissions that grants everything and returns PrivilegeRegistry.ALL
upon CompiledPermissions.getPrivileges(Path) for all
paths. |
protected CompiledPermissions |
getReadOnlyPermissions()
Returns compiled permissions for a read-only user i.e. permissions that grants READ permission for all non-AC items. |
void |
init(Session systemSession,
Map configuration)
Tests if the given systemSession is a SessionImpl and
retrieves the observation manager. |
boolean |
isAdminOrSystem(Set principals)
Test if the specified set of principals contains an admin or system principal. |
boolean |
isReadOnly(Set principals)
Test if if the specified set of principals will have read-only permissions only. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.jackrabbit.core.security.authorization.AccessControlProvider |
---|
canAccessRoot, compilePermissions, getEditor, getEffectivePolicies |
Methods inherited from interface org.apache.jackrabbit.core.security.authorization.AccessControlUtils |
---|
isAcItem, isAcItem |
Field Detail |
---|
public static final String PARAM_OMIT_DEFAULT_PERMISSIONS
protected SessionImpl session
protected ObservationManager observationMgr
protected NamePathResolver resolver
Constructor Detail |
---|
protected AbstractAccessControlProvider()
Method Detail |
---|
protected void checkInitialized()
IllegalStateException
if the provider has not
been initialized or has been closed.
protected static CompiledPermissions getAdminPermissions()
PrivilegeRegistry.ALL
upon CompiledPermissions.getPrivileges(Path)
for all
paths.
CompiledPermissions
that
grants everything and always returns PrivilegeRegistry.ALL
upon CompiledPermissions.getPrivileges(Path)
.protected CompiledPermissions getReadOnlyPermissions()
CompiledPermissions
that
grants READ permission for all non-AC items.public boolean isAdminOrSystem(Set principals)
AccessControlUtils
isAdminOrSystem
in interface AccessControlUtils
AdminPrincipal
or a SystemPrincipal
.AccessControlUtils.isAdminOrSystem(Set)
public boolean isReadOnly(Set principals)
AccessControlUtils
isReadOnly
in interface AccessControlUtils
AccessControlUtils.isReadOnly(Set)
public void init(Session systemSession, Map configuration) throws RepositoryException
systemSession
is a SessionImpl and
retrieves the observation manager. The it sets the internal 'initialized'
field to true.
init
in interface AccessControlProvider
RepositoryException
- If the specified session is not a
SessionImpl
or if retrieving the observation manager fails.AccessControlProvider.init(Session, Map)
public void close()
AccessControlProvider
close
in interface AccessControlProvider
AccessControlProvider.close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |