|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jackrabbit.core.security.SimpleAccessManager
SimpleAccessManager
...
Field Summary | |
protected boolean |
anonymous
|
protected HierarchyManager |
hierMgr
hierarchy manager used for ACL-based access control model |
protected Subject |
subject
Subject whose access rights this AccessManager should reflect |
protected boolean |
system
|
Fields inherited from interface org.apache.jackrabbit.core.security.AccessManager |
READ, REMOVE, WRITE |
Constructor Summary | |
SimpleAccessManager()
Empty constructor |
Method Summary | |
boolean |
canAccess(String workspaceName)
Determines whether the subject of the current context is granted access to the given workspace. |
void |
checkPermission(ItemId id,
int permissions)
Determines whether the specified permissions are granted
on the item with the specified id (i.e. the target item). |
void |
close()
Close this access manager. After having closed an access manager, further operations on this object are treated as illegal and throw |
void |
init(AMContext context)
Initialize this access manager. An AccessDeniedException will
be thrown if the subject of the given context is not
granted access to the specified workspace. |
boolean |
isGranted(ItemId id,
int permissions)
Determines whether the specified permissions are granted
on the item with the specified id (i.e. the target item). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Subject subject
protected HierarchyManager hierMgr
protected boolean system
protected boolean anonymous
Constructor Detail |
public SimpleAccessManager()
Method Detail |
public void init(AMContext context) throws AccessDeniedException, Exception
AccessDeniedException
will
be thrown if the subject of the given context
is not
granted access to the specified workspace.
init
in interface AccessManager
context
- access manager context
Exception
- if another error occurs
AccessDeniedException
- if the subject is not granted access
to the specified workspace.public void close() throws Exception
close
in interface AccessManager
Exception
- if an error occurspublic void checkPermission(ItemId id, int permissions) throws AccessDeniedException, ItemNotFoundException, RepositoryException
permissions
are granted
on the item with the specified id
(i.e. the target item).
checkPermission
in interface AccessManager
id
- the id of the target itempermissions
- A combination of one or more of the following constants
encoded as a bitmask value:
READ
WRITE
REMOVE
ItemNotFoundException
- if the target item does not exist
AccessDeniedException
- if permission is denied
RepositoryException
- it an error occurspublic boolean isGranted(ItemId id, int permissions) throws ItemNotFoundException, RepositoryException
permissions
are granted
on the item with the specified id
(i.e. the target item).
isGranted
in interface AccessManager
id
- the id of the target itempermissions
- A combination of one or more of the following constants
encoded as a bitmask value:
READ
WRITE
REMOVE
true
if permission is granted; otherwise false
ItemNotFoundException
- if the target item does not exist
RepositoryException
- if another error occurspublic boolean canAccess(String workspaceName) throws NoSuchWorkspaceException, RepositoryException
canAccess
in interface AccessManager
workspaceName
- name of workspace
true
if the subject of the current context is
granted access to the given workspace; otherwise false
.
NoSuchWorkspaceException
- if a workspace with the given name
does not exist.
RepositoryException
- if another error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |