public abstract class TorqueAbstractPermissionManager extends AbstractPermissionManager
managerROLE| Constructor and Description |
|---|
TorqueAbstractPermissionManager() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkExists(String permissionName)
Determines if the
Permission exists in the security system. |
void |
configure(org.apache.avalon.framework.configuration.Configuration conf)
Avalon Service lifecycle method
|
protected abstract <T extends Permission> |
doSelectAllPermissions(Connection con)
Get all specialized Permissions
|
protected abstract <T extends Permission> |
doSelectById(Integer id,
Connection con)
Get a specialized Permission by id
|
protected abstract <T extends Permission> |
doSelectByName(String name,
Connection con)
Get a specialized Permission by 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.
|
protected <T extends Permission> |
persistNewPermission(T permission)
Creates a new permission with specified attributes.
|
void |
removePermission(Permission permission)
Removes a Permission from the system.
|
void |
renamePermission(Permission permission,
String name)
Renames an existing Permission.
|
addPermission, checkExists, getPermissionInstance, getPermissionInstancegetClassName, setClassNamedispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, servicepublic void configure(org.apache.avalon.framework.configuration.Configuration conf)
throws org.apache.avalon.framework.configuration.ConfigurationException
configure in interface org.apache.avalon.framework.configuration.Configurableconfigure in class AbstractEntityManagerorg.apache.avalon.framework.configuration.ConfigurationExceptionprotected abstract <T extends Permission> List<T> doSelectAllPermissions(Connection con) throws org.apache.torque.TorqueException
con - a database connectionorg.apache.torque.TorqueException - if any database error occursprotected abstract <T extends Permission> T doSelectByName(String name, Connection con) throws org.apache.torque.NoRowsException, org.apache.torque.TooManyRowsException, org.apache.torque.TorqueException
name - the name of the groupcon - a database connectionorg.apache.torque.NoRowsException - if no such group existsorg.apache.torque.TooManyRowsException - if multiple groups with the given name existorg.apache.torque.TorqueException - if any database error occurs if any other
database error occursprotected abstract <T extends Permission> T doSelectById(Integer id, Connection con) throws org.apache.torque.NoRowsException, org.apache.torque.TooManyRowsException, org.apache.torque.TorqueException
id - the id of the groupcon - a database connectionorg.apache.torque.NoRowsException - if no such group existsorg.apache.torque.TooManyRowsException - if multiple groups with the given id existorg.apache.torque.TorqueException - if any database error occurs if any other
database error occurspublic 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.public 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.protected <T extends Permission> T persistNewPermission(T permission) throws DataBackendException
persistNewPermission in class AbstractPermissionManagerpermission - the object describing the permission to be created.DataBackendException - if there was an error accessing the data
backend.public PermissionSet getAllPermissions() throws DataBackendException
DataBackendException - if there was an error accessing the data
backend.public boolean checkExists(String permissionName) throws DataBackendException
Permission exists in the security system.permissionName - a Permission valueDataBackendException - when more than one Permission with the same name
exists.public <T extends Permission> T getPermissionById(Object id) throws DataBackendException, UnknownEntityException
getPermissionById in interface PermissionManagergetPermissionById in class AbstractPermissionManagerid - the id 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 getPermissionByName(String name) throws DataBackendException, UnknownEntityException
getPermissionByName in interface PermissionManagergetPermissionByName in class AbstractPermissionManagername - the name of the Group.DataBackendException - if there was an error accessing the data
backend.UnknownEntityException - if the group does not exist.Copyright © 2011–2019 The Apache Software Foundation. All rights reserved.