public class SimpleJBossAccessManager extends Object implements AccessManager
| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | anonymous | 
| protected boolean | system | 
READ, REMOVE, WRITE| Constructor and Description | 
|---|
| SimpleJBossAccessManager() | 
| 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(Path itemPath,
       ItemId itemId)Determines whether the item with the specified  itemPathoritemIdcan be read. | 
| void | checkPermission(ItemId id,
               int permissions)Determines whether the specified  permissionsare granted
 on the item with the specifiedid(i.e. | 
| void | checkPermission(Path absPath,
               int permissions)Determines whether the specified  permissionsare granted
 on the item with the specifiedid(i.e. | 
| void | checkRepositoryPermission(int permissions)Determines whether the specified  permissionsare granted
 on the repository level. | 
| 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  permissionsare granted
 on the item with the specifiedid(i.e. | 
| boolean | isGranted(Path absPath,
         int permissions)Determines whether the specified  permissionsare granted
 on the item with the specifiedabsPath(i.e. | 
| boolean | isGranted(Path parentPath,
         Name childName,
         int permissions)Determines whether the specified  permissionsare granted
 on an item represented by the combination of the givenparentPathandchildName(i.e. | 
public void init(AMContext context) throws javax.jcr.AccessDeniedException, Exception
AccessManagerAccessDeniedException will
 be thrown if the subject of the given context is not
 granted access to the specified workspace.init in interface AccessManagercontext - access manager contextjavax.jcr.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 javax.jcr.AccessDeniedException, Exception
AccessManagerAccessDeniedException will
 be thrown if the subject of the given context is not
 granted access to the specified workspace.init in interface AccessManagercontext - access manager context.acProvider - The access control provider.wspAccessMgr - The workspace access manager.javax.jcr.AccessDeniedException - if the subject is not granted access
                               to the specified workspace.Exception - if another error occurspublic void close()
AccessManagerclose in interface AccessManagerpublic void checkPermission(ItemId id, int permissions) throws javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
AccessManagerpermissions are granted
 on the item with the specified id (i.e. the target item).checkPermission in interface AccessManagerid - 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 deniedjavax.jcr.ItemNotFoundException - if the target item does not existjavax.jcr.RepositoryException - it an error occurspublic void checkPermission(Path absPath, int permissions) throws javax.jcr.AccessDeniedException, javax.jcr.RepositoryException
AccessManagerpermissions are granted
 on the item with the specified id (i.e. the target item).checkPermission in interface AccessManagerabsPath - Path to an item.permissions - A combination of one or more of the
 Permission
 constants encoded as a bitmask value.javax.jcr.AccessDeniedException - if permission is deniedjavax.jcr.RepositoryException - it another error occurspublic void checkRepositoryPermission(int permissions)
                               throws javax.jcr.AccessDeniedException,
                                      javax.jcr.RepositoryException
AccessManagerpermissions are granted
 on the repository level.checkRepositoryPermission in interface AccessManagerpermissions - The permissions to check.javax.jcr.AccessDeniedException - if permissions are denied.javax.jcr.RepositoryException - if another error occurs.public boolean isGranted(ItemId id, int permissions) throws javax.jcr.RepositoryException
AccessManagerpermissions are granted
 on the item with the specified id (i.e. the target item).isGranted in interface AccessManagerid - 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 falsejavax.jcr.ItemNotFoundException - if the target item does not existjavax.jcr.RepositoryException - if another error occurspublic boolean isGranted(Path absPath, int permissions) throws javax.jcr.RepositoryException
AccessManagerpermissions are granted
 on the item with the specified absPath (i.e. the target
 item, that may or may not yet exist).isGranted in interface AccessManagerabsPath - the absolute path to testpermissions - A combination of one or more of the
 Permission
 constants encoded as a bitmask value.true if the specified permissions are granted;
 otherwise false.javax.jcr.RepositoryException - if an error occurs.public boolean isGranted(Path parentPath, Name childName, int permissions) throws javax.jcr.RepositoryException
AccessManagerpermissions 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 AccessManagerparentPath - 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
 Permission
 constants encoded as a bitmask value.true if the specified permissions are granted;
 otherwise false.javax.jcr.RepositoryException - if an error occurs.public boolean canRead(Path itemPath, ItemId itemId) throws javax.jcr.RepositoryException
AccessManageritemPath
 or itemId can be read. Either of the two parameters
 may be null.AccessManager.isGranted(Path, int) should be used instead.
 If this method is called with both Path and ItemId it is left to the evaluation, which parameter is used.
canRead in interface AccessManageritemPath - The path to the item or null if itemId
 should be used to determine the READ permission.itemId - Id of the item to be tested or null if the
 itemPath should be used to determine the permission.true if the item can be read; otherwise false.javax.jcr.RepositoryException - if the item is NEW and only an itemId is
 specified or if another error occurs.public boolean canAccess(String workspaceName) throws javax.jcr.RepositoryException
AccessManagerfalse, if no such workspace
 exists.canAccess in interface AccessManagerworkspaceName - name of workspacetrue if the subject of the current context is
         granted access to the given workspace; otherwise false.javax.jcr.RepositoryException - if an error occurs.Copyright © 2004-2020 The Apache Software Foundation. All Rights Reserved.