|
||||||||||
| 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
Constant for the name of the configuration option "omit-default-permission". |
protected int |
privAll
|
protected int |
privRead
|
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 CompiledPermissions |
getAdminPermissions()
Returns compiled permissions for the administrator i.e. |
protected CompiledPermissions |
getReadOnlyPermissions()
Returns compiled permissions for a read-only user i.e. |
void |
init(Session systemSession,
Map configuration)
Tests if the given systemSession is a SessionImpl and
retrieves the observation manager. |
boolean |
isAdminOrSystem(Set<Principal> principals)
Test if the specified set of principals contains an admin or system principal. |
boolean |
isLive()
Returns true, if this provider is still alive and able to
evaluate permissions; false otherwise. |
boolean |
isReadOnly(Set<Principal> 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
protected int privAll
protected int privRead
| Constructor Detail |
|---|
protected AbstractAccessControlProvider()
| Method Detail |
|---|
protected void checkInitialized()
IllegalStateException if the provider has not
been initialized or has been closed.
protected CompiledPermissions getAdminPermissions()
Privilege.JCR_ALL
upon CompiledPermissions.getPrivileges(Path) for all
paths.
CompiledPermissions that
grants everything and always returns the int representation of
Privilege.JCR_ALL upon CompiledPermissions.getPrivileges(Path).protected CompiledPermissions getReadOnlyPermissions()
CompiledPermissions that
grants READ permission for all non-AC items.public boolean isAdminOrSystem(Set<Principal> principals)
AccessControlUtils
isAdminOrSystem in interface AccessControlUtilsprincipals - A set of principals.
AdminPrincipal or a SystemPrincipal.AccessControlUtils.isAdminOrSystem(Set)public boolean isReadOnly(Set<Principal> principals)
AccessControlUtils
isReadOnly in interface AccessControlUtilsprincipals - A set of principals.
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 AccessControlProvidersystemSession - System session.configuration - Configuration used to initialize this provider.
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 AccessControlProviderAccessControlProvider.close()public boolean isLive()
AccessControlProvidertrue, if this provider is still alive and able to
evaluate permissions; false otherwise.
isLive in interface AccessControlProvidertrue, if this provider is still alive and able to
evaluate permissions; false otherwise.AccessControlProvider.isLive()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||