|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.security.SimpleJBossAccessManager
public class SimpleJBossAccessManager
The simple JBoss access manager is a specialized Access Manager to handle Authorization of individuals authenticated through JBoss login modules. It maps roles from the JBoss simplegroup class to Jackrabbit permissions.
http://wiki.apache.org/jackrabbit/SimpleJbossAccessManager
Field Summary | |
---|---|
protected boolean |
anonymous
|
protected boolean |
system
|
Fields inherited from interface org.apache.jackrabbit.core.security.AccessManager |
---|
READ, REMOVE, WRITE |
Constructor Summary | |
---|---|
SimpleJBossAccessManager()
|
Method Summary | |
---|---|
boolean |
canAccess(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)
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. |
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)
Determines whether the specified permissions are granted
on the item with the specified id (i.e. the target item). |
boolean |
isGranted(Path absPath,
int permissions)
Determines whether the specified permissions are granted
on the item with the specified absPath (i.e. the target
item, that may or may not yet exist). |
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. the target
item, that may or may not yet exist). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean system
protected boolean anonymous
Constructor Detail |
---|
public SimpleJBossAccessManager()
Method Detail |
---|
public void init(AMContext context) throws AccessDeniedException, Exception
AccessManager
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
AccessDeniedException
- if the subject is not granted access
to the specified workspace.
Exception
- if another error occurspublic void init(AMContext context, AccessControlProvider acProvider, WorkspaceAccessManager wspAccessMgr) throws AccessDeniedException, Exception
AccessManager
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
AccessDeniedException
- if the subject is not granted access
to the specified workspace.
Exception
- if another error occurspublic void close()
AccessManager
close
in interface AccessManager
public void checkPermission(ItemId id, int permissions) throws AccessDeniedException, RepositoryException
AccessManager
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
AccessDeniedException
- if permission is denied
ItemNotFoundException
- if the target item does not exist
RepositoryException
- it an error occurspublic boolean isGranted(ItemId id, int permissions) throws RepositoryException
AccessManager
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 isGranted(Path absPath, int permissions) throws RepositoryException
AccessManager
permissions
are granted
on the item with the specified absPath
(i.e. the target
item, that may or may not yet exist).
isGranted
in interface AccessManager
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
.
RepositoryException
- if an error occurs.public boolean isGranted(Path parentPath, Name childName, int permissions) throws RepositoryException
AccessManager
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).
isGranted
in interface AccessManager
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
.
RepositoryException
- if an error occurs.public boolean canRead(Path itemPath) throws RepositoryException
AccessManager
canRead
in interface AccessManager
true
if the item can be read; otherwise false
.
RepositoryException
- if an error occurs.public boolean canAccess(String workspaceName) throws RepositoryException
AccessManager
false
, if no such workspace
exists.
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
.
RepositoryException
- if an error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |