public abstract class AbstractPermissionManager extends AbstractEntityManager implements PermissionManager
manager
ROLE
Constructor and Description |
---|
AbstractPermissionManager() |
Modifier and Type | Method and Description |
---|---|
<T extends Permission> |
addPermission(T permission)
Creates a new permission with specified attributes.
|
boolean |
checkExists(Permission permission)
Check whether a specified permission exists.
|
<T extends Permission> |
getPermissionById(Object id)
Retrieve a Permission object with specified Id.
|
<T extends Permission> |
getPermissionByName(String name)
Retrieve a Permission object with specified name.
|
<T extends Permission> |
getPermissionInstance()
Construct a blank Permission object.
|
<T extends Permission> |
getPermissionInstance(String permName)
Construct a blank Permission object.
|
protected abstract <T extends Permission> |
persistNewPermission(T permission) |
configure, getClassName, setClassName
dispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, service
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkExists, getAllPermissions, removePermission, renamePermission
protected abstract <T extends Permission> T persistNewPermission(T permission) throws DataBackendException
DataBackendException
public <T extends Permission> T getPermissionInstance() throws DataBackendException
getPermissionInstance
in interface PermissionManager
DataBackendException
- if the object could not be instantiated.public <T extends Permission> T getPermissionInstance(String permName) throws DataBackendException
getPermissionInstance
in interface PermissionManager
permName
- The name of the permission.DataBackendException
- if the object could not be instantiated.public <T extends Permission> T getPermissionByName(String name) throws DataBackendException, UnknownEntityException
getPermissionByName
in interface PermissionManager
name
- the name of the Permission.DataBackendException
- if there was an error accessing the data backend.UnknownEntityException
- if the permission does not exist.public <T extends Permission> T getPermissionById(Object id) throws DataBackendException, UnknownEntityException
getPermissionById
in interface PermissionManager
name
- the name of the Permission.UnknownEntityException
- if the permission does not exist in the database.DataBackendException
- if there is a problem accessing the storage.public <T extends Permission> T addPermission(T permission) throws DataBackendException, EntityExistsException
addPermission
in interface PermissionManager
permission
- the object describing the permission to be created.DataBackendException
- if there was an error accessing the data backend.EntityExistsException
- if the permission already exists.public boolean checkExists(Permission permission) throws DataBackendException
checkExists
in interface PermissionManager
role
- The permission to be checked.DataBackendException
- if there was an error accessing the data backend.Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.