|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AccessManager
The AccessManager can be queried to determines whether privileges
are granted on a specific item.
| Field Summary | |
|---|---|
static int |
READ
Deprecated. |
static int |
REMOVE
Deprecated. |
static int |
WRITE
Deprecated. |
| Method Summary | |
|---|---|
boolean |
canAccess(java.lang.String workspaceName)
Determines whether the subject of the current context is granted access to the given workspace. |
boolean |
canRead(Path itemPath)
Determines whether the item at the specified absolute path can be read. |
void |
checkPermission(ItemId id,
int permissions)
Deprecated. |
void |
close()
Close this access manager. |
void |
init(AMContext context)
Initialize this access manager. |
void |
init(AMContext context,
AccessControlProvider acProvider,
WorkspaceAccessManager wspAccessMgr)
Initialize this access manager. |
boolean |
isGranted(ItemId id,
int permissions)
Deprecated. |
boolean |
isGranted(Path absPath,
int permissions)
Determines whether the specified permissions are granted
on the item with the specified absPath (i.e. |
boolean |
isGranted(Path parentPath,
Name childName,
int permissions)
Determines whether the specified permissions are granted
on an item represented by the combination of the given
parentPath and childName (i.e. |
| Field Detail |
|---|
static final int READ
static final int WRITE
static final int REMOVE
| Method Detail |
|---|
void init(AMContext context)
throws javax.jcr.AccessDeniedException,
java.lang.Exception
AccessDeniedException will
be thrown if the subject of the given context is not
granted access to the specified workspace.
context - access manager context
javax.jcr.AccessDeniedException - if the subject is not granted access
to the specified workspace.
java.lang.Exception - if another error occurs
void init(AMContext context,
AccessControlProvider acProvider,
WorkspaceAccessManager wspAccessMgr)
throws javax.jcr.AccessDeniedException,
java.lang.Exception
AccessDeniedException will
be thrown if the subject of the given context is not
granted access to the specified workspace.
context - access manager contextacProvider - wspAccessMgr -
javax.jcr.AccessDeniedException - if the subject is not granted access
to the specified workspace.
java.lang.Exception - if another error occurs
void close()
throws java.lang.Exception
java.lang.Exception - if an error occurs
void checkPermission(ItemId id,
int permissions)
throws javax.jcr.AccessDeniedException,
javax.jcr.ItemNotFoundException,
javax.jcr.RepositoryException
permissions are granted
on the item with the specified id (i.e. the target item).
id - the id of the target itempermissions - A combination of one or more of the following constants
encoded as a bitmask value:
READWRITEREMOVEjavax.jcr.AccessDeniedException - if permission is denied
javax.jcr.ItemNotFoundException - if the target item does not exist
javax.jcr.RepositoryException - it an error occurs
boolean isGranted(ItemId id,
int permissions)
throws javax.jcr.ItemNotFoundException,
javax.jcr.RepositoryException
permissions are granted
on the item with the specified id (i.e. the target item).
id - the id of the target itempermissions - A combination of one or more of the following constants
encoded as a bitmask value:
READWRITEREMOVEtrue if permission is granted; otherwise false
javax.jcr.ItemNotFoundException - if the target item does not exist
javax.jcr.RepositoryException - if another error occurs
boolean isGranted(Path absPath,
int permissions)
throws javax.jcr.RepositoryException
permissions are granted
on the item with the specified absPath (i.e. the target
item, that may or may not yet exist).
absPath - the absolute path to testpermissions - A combination of one or more of the following constants
encoded as a bitmask value:
true if the specified permissions are granted;
otherwise false.
javax.jcr.RepositoryException - if an error occurs.
boolean isGranted(Path parentPath,
Name childName,
int permissions)
throws javax.jcr.RepositoryException
permissions are granted
on an item represented by the combination of the given
parentPath and childName (i.e. the target
item, that may or may not yet exist).
parentPath - Path to an existing parent node.childName - Name of the child item that may or may not exist yet.permissions - A combination of one or more of the following constants
encoded as a bitmask value:
true if the specified permissions are granted;
otherwise false.
javax.jcr.RepositoryException - if an error occurs.
boolean canRead(Path itemPath)
throws javax.jcr.RepositoryException
itemPath -
true if the item can be read; otherwise false.
javax.jcr.RepositoryException - if an error occurs.
boolean canAccess(java.lang.String workspaceName)
throws javax.jcr.RepositoryException
false, if no such workspace
exists.
workspaceName - name of workspace
true if the subject of the current context is
granted access to the given workspace; otherwise false.
javax.jcr.RepositoryException - if an error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||