|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.core.security.authorization.AbstractCompiledPermissions
public abstract class AbstractCompiledPermissions
AbstractCompiledPermissions...
| Nested Class Summary | |
|---|---|
static class |
AbstractCompiledPermissions.Result
Result of permission (and optionally privilege) evaluation for a given path. |
| Field Summary |
|---|
| Fields inherited from interface org.apache.jackrabbit.core.security.authorization.CompiledPermissions |
|---|
NO_PERMISSION |
| Constructor Summary | |
|---|---|
protected |
AbstractCompiledPermissions()
|
| Method Summary | |
|---|---|
protected abstract AbstractCompiledPermissions.Result |
buildRepositoryResult()
Retrieve the result for repository level operations. |
protected abstract AbstractCompiledPermissions.Result |
buildResult(org.apache.jackrabbit.spi.Path absPath)
Retrieve the result for the specified path. |
boolean |
canReadAll()
Returns true if READ permission is granted everywhere. |
protected void |
clearCache()
Removes all entries from the cache. |
void |
close()
Indicate to this CompiledPermissions object that it is
not used any more. |
protected abstract PrivilegeManagerImpl |
getPrivilegeManagerImpl()
Retrieve the privilege manager. |
int |
getPrivileges(org.apache.jackrabbit.spi.Path absPath)
Returns the Privilege bits granted by the underlying policy
if the given absPath. |
Set<Privilege> |
getPrivilegeSet(org.apache.jackrabbit.spi.Path absPath)
Returns the Privileges granted by the underlying policy
at the given absPath. |
AbstractCompiledPermissions.Result |
getResult(org.apache.jackrabbit.spi.Path absPath)
|
boolean |
grants(org.apache.jackrabbit.spi.Path absPath,
int permissions)
Returns true if the specified permissions are granted
on the item identified by the given path. |
boolean |
hasPrivileges(org.apache.jackrabbit.spi.Path absPath,
Privilege... privileges)
Returns true if the given privileges are granted at the
specified absPath. |
| 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.CompiledPermissions |
|---|
canRead |
| Constructor Detail |
|---|
protected AbstractCompiledPermissions()
| Method Detail |
|---|
public AbstractCompiledPermissions.Result getResult(org.apache.jackrabbit.spi.Path absPath)
throws RepositoryException
absPath - Absolute path to return the result for.
Result for the give absPath.
RepositoryException - if an error occurs.
protected abstract AbstractCompiledPermissions.Result buildResult(org.apache.jackrabbit.spi.Path absPath)
throws RepositoryException
absPath - Absolute path to build the result for.
absPath.
RepositoryException - If an error occurs.
protected abstract AbstractCompiledPermissions.Result buildRepositoryResult()
throws RepositoryException
RepositoryException
protected abstract PrivilegeManagerImpl getPrivilegeManagerImpl()
throws RepositoryException
RepositoryException - If an error occurs.protected void clearCache()
public void close()
CompiledPermissionsCompiledPermissions object that it is
not used any more.
close in interface CompiledPermissionsCompiledPermissions.close()
public boolean grants(org.apache.jackrabbit.spi.Path absPath,
int permissions)
throws RepositoryException
CompiledPermissionstrue if the specified permissions are granted
on the item identified by the given path.
grants in interface CompiledPermissionsabsPath - Absolute path pointing to an item. If the item does
not exist yet (asking for 'add-node' and 'set-property' permission),
it's direct ancestor must exist.permissions - A combination of one or more of permission constants
defined by Permission encoded as a bitmask value
true if the specified permissions are granted,
false otherwise.
RepositoryException - if an error occurs.CompiledPermissions.grants(Path, int)
public int getPrivileges(org.apache.jackrabbit.spi.Path absPath)
throws RepositoryException
CompiledPermissionsPrivilege bits granted by the underlying policy
if the given absPath.
getPrivileges in interface CompiledPermissionsabsPath - Absolute path to a Node.
absPath.
RepositoryException - if an error occursCompiledPermissions.getPrivileges(Path)
public boolean hasPrivileges(org.apache.jackrabbit.spi.Path absPath,
Privilege... privileges)
throws RepositoryException
CompiledPermissionstrue if the given privileges are granted at the
specified absPath.
hasPrivileges in interface CompiledPermissionstrue if the given privileges are granted at the
specified absPath.
RepositoryExceptionCompiledPermissions.hasPrivileges(org.apache.jackrabbit.spi.Path, javax.jcr.security.Privilege[])
public Set<Privilege> getPrivilegeSet(org.apache.jackrabbit.spi.Path absPath)
throws RepositoryException
CompiledPermissionsPrivileges granted by the underlying policy
at the given absPath.
getPrivilegeSet in interface CompiledPermissionsabsPath - Absolute path to a Node.
absPath.
RepositoryException - if an error occursCompiledPermissions.getPrivilegeSet(Path)
public boolean canReadAll()
throws RepositoryException
CompiledPermissionstrue if READ permission is granted everywhere.
This method acts as shortcut for CompiledPermissions.grants(Path, int) where
permissions is Permission.READ and allows to shorten the
evaluation time given the fact that a check for READ permission is
considered to be the most frequent test.
canReadAll in interface CompiledPermissionstrue if the READ permission is granted everywhere.
RepositoryException - if an error occursCompiledPermissions.canReadAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||