public interface AccessManager
AccessManager
can be queried to determines whether permission
is granted to perform a specific action on a specific item.Modifier and Type | Field and Description |
---|---|
static String |
ADD_NODE_ACTION |
static String[] |
READ |
static String |
READ_ACTION
predefined action constants
|
static String[] |
REMOVE |
static String |
REMOVE_ACTION |
static String |
SET_PROPERTY_ACTION |
Modifier and Type | Method and Description |
---|---|
boolean |
canAccess(String workspaceName)
Determines whether the subject of the current context is granted access
to the given workspace.
|
boolean |
canRead(ItemState itemState)
Returns true if the existing item with the given
ItemId can
be read. |
boolean |
canRemove(ItemState itemState)
Returns true if the existing item state can be removed.
|
boolean |
isGranted(ItemState itemState,
String[] actions)
Determines whether the specified
permissions are granted
on the item with the specified path. |
boolean |
isGranted(NodeState parentState,
Path relPath,
String[] actions)
Determines whether the specified
permissions are granted
on the item with the specified path. |
static final String READ_ACTION
static final String REMOVE_ACTION
static final String ADD_NODE_ACTION
static final String SET_PROPERTY_ACTION
static final String[] READ
static final String[] REMOVE
boolean isGranted(NodeState parentState, Path relPath, String[] actions) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
permissions
are granted
on the item with the specified path.parentState
- The node state of the next existing ancestor.relPath
- The relative path pointing to the non-existing target item.actions
- An array of actions that need to be checked.true
if the actions are granted; otherwise false
javax.jcr.ItemNotFoundException
- if the target item does not existjavax.jcr.RepositoryException
- if another error occursboolean isGranted(ItemState itemState, String[] actions) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
permissions
are granted
on the item with the specified path.itemState
- actions
- An array of actions that need to be checked.true
if the actions are granted; otherwise false
javax.jcr.ItemNotFoundException
- if the target item does not existjavax.jcr.RepositoryException
- if another error occursboolean canRead(ItemState itemState) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
ItemId
can
be read.itemState
- javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
boolean canRemove(ItemState itemState) throws javax.jcr.ItemNotFoundException, javax.jcr.RepositoryException
itemState
- javax.jcr.ItemNotFoundException
javax.jcr.RepositoryException
boolean canAccess(String workspaceName) throws javax.jcr.NoSuchWorkspaceException, javax.jcr.RepositoryException
workspaceName
- name of workspacetrue
if the subject of the current context is
granted access to the given workspace; otherwise false
.javax.jcr.NoSuchWorkspaceException
- if a workspace with the given name does not exist.javax.jcr.RepositoryException
- if another error occursCopyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.