public interface PermissionManager extends Serializable
Permission
objects related tasks on behalf of the
BaseSecurityService.
The responsibilities of this class include loading data of an permission from the
storage and putting them into the
Permission objects, saving those data
to the permanent storage.| Modifier and Type | Field and Description |
|---|---|
static String |
ROLE
Avalon role - used to id the component within the manager
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Permission> |
addPermission(T permission)
Creates a new permission with specified attributes.
|
boolean |
checkExists(Permission permission)
Determines if the
Permission exists in the security system. |
boolean |
checkExists(String permissionName)
Determines if a
Permission exists in the security system
with the specified name. |
PermissionSet |
getAllPermissions()
Retrieves all permissions defined in the system.
|
<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.
|
void |
removePermission(Permission permission)
Removes a Permission from the system.
|
void |
renamePermission(Permission permission,
String name)
Renames an existing Permission.
|
static final String ROLE
<T extends Permission> T getPermissionInstance() throws DataBackendException
DataBackendException - if there was an error accessing the data backend.<T extends Permission> T getPermissionInstance(String permName) throws DataBackendException
permName - The name of the PermissionDataBackendException - if there was an error accessing the data backend.<T extends Permission> T getPermissionByName(String name) throws DataBackendException, UnknownEntityException
name - the name of the Permission.DataBackendException - if there was an error accessing the data backend.UnknownEntityException - if the permission does not exist.<T extends Permission> T getPermissionById(Object id) throws DataBackendException, UnknownEntityException
id - the Id of the Permission.UnknownEntityException - if the permission does not exist in the database.DataBackendException - if there is a problem accessing the storage.PermissionSet getAllPermissions() throws DataBackendException
DataBackendException - if there was an error accessing the data backend.<T extends Permission> T addPermission(T permission) throws DataBackendException, EntityExistsException
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.void removePermission(Permission permission) throws DataBackendException, UnknownEntityException
permission - The object describing the permission to be removed.DataBackendException - if there was an error accessing the data backend.UnknownEntityException - if the permission does not exist.void renamePermission(Permission permission, String name) throws DataBackendException, UnknownEntityException
permission - The object describing the permission to be renamed.name - the new name for the permission.DataBackendException - if there was an error accessing the data backend.UnknownEntityException - if the permission does not exist.boolean checkExists(Permission permission) throws DataBackendException
Permission exists in the security system.permission - a Permission valueDataBackendException - when more than one Permission with the same name exists.boolean checkExists(String permissionName) throws DataBackendException
Permission exists in the security system
with the specified name.permissionName - the name of a Permission to checkDataBackendException - when more than one Permission with the same name exists.Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.