|
||||||||||
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
|
Constructor Summary | |
---|---|
protected |
AbstractCompiledPermissions()
|
Method Summary | |
---|---|
protected abstract AbstractCompiledPermissions.Result |
buildResult(Path absPath)
|
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. |
int |
getPrivileges(Path absPath)
Returns the Privilege bits granted by the underlying policy
if the given absPath denotes an existing Node ,
otherwise it returns zero. |
AbstractCompiledPermissions.Result |
getResult(Path absPath)
|
boolean |
grants(Path absPath,
int permissions)
Returns true if the specified permissions are granted
on the item identified by the given path . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractCompiledPermissions()
Method Detail |
---|
public AbstractCompiledPermissions.Result getResult(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(Path absPath) throws RepositoryException
absPath
- Absolute path to build the result for.
absPath
.
RepositoryException
- If an error occurs.protected void clearCache()
public void close()
CompiledPermissions
CompiledPermissions
object that it is
not used any more.
close
in interface CompiledPermissions
CompiledPermissions.close()
public boolean grants(Path absPath, int permissions) throws RepositoryException
CompiledPermissions
true
if the specified permissions are granted
on the item identified by the given path
.
grants
in interface CompiledPermissions
absPath
- 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(Path absPath) throws RepositoryException
CompiledPermissions
Privilege
bits granted by the underlying policy
if the given absPath
denotes an existing Node
,
otherwise it returns zero.
getPrivileges
in interface CompiledPermissions
absPath
- Absolute path to a Node
.
absPath
or zero if
the path does not denote an existing Node
.
RepositoryException
- if an error occursCompiledPermissions.getPrivileges(Path)
public boolean canReadAll() throws RepositoryException
CompiledPermissions
true
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 CompiledPermissions
true
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 |