Klasse TorqueAbstractPermissionManager
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.security.spi.AbstractManager
org.apache.fulcrum.security.spi.AbstractEntityManager
org.apache.fulcrum.security.spi.AbstractPermissionManager
org.apache.fulcrum.security.torque.TorqueAbstractPermissionManager
- Alle implementierten Schnittstellen:
Serializable,org.apache.avalon.framework.activity.Disposable,org.apache.avalon.framework.configuration.Configurable,org.apache.avalon.framework.logger.LogEnabled,org.apache.avalon.framework.service.Serviceable,org.apache.avalon.framework.thread.ThreadSafe,PermissionManager
- Bekannte direkte Unterklassen:
PeerPermissionManager,TorqueDynamicPermissionManagerImpl
This implementation persists to a database via Torque.
- Version:
- $Id:$
- Autor:
- Thomas Vandahl
- Siehe auch:
-
Feldübersicht
Von Klasse geerbte Felder org.apache.fulcrum.security.spi.AbstractManager
managerVon Schnittstelle geerbte Felder org.apache.fulcrum.security.PermissionManager
ROLE -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbooleancheckExists(String permissionName) Determines if thePermissionexists in the security system.voidconfigure(org.apache.avalon.framework.configuration.Configuration conf) Avalon Service lifecycle methodprotected abstract <T extends Permission>
List<T>Get all specialized Permissionsprotected abstract <T extends Permission>
TdoSelectById(Integer id, Connection con) Get a specialized Permission by idprotected abstract <T extends Permission>
TdoSelectByName(String name, Connection con) Get a specialized Permission by nameRetrieves all permissions defined in the system.<T extends Permission>
TRetrieve a Permission object with specified id.<T extends Permission>
TgetPermissionByName(String name) Retrieve a Permission object with specified name.protected <T extends Permission>
TpersistNewPermission(T permission) Creates a new permission with specified attributes.voidremovePermission(Permission permission) Removes a Permission from the system.voidrenamePermission(Permission permission, String name) Renames an existing Permission.Von Klasse geerbte Methoden org.apache.fulcrum.security.spi.AbstractPermissionManager
addPermission, checkExists, getPermissionInstance, getPermissionInstanceVon Klasse geerbte Methoden org.apache.fulcrum.security.spi.AbstractEntityManager
getClassName, setClassNameVon Klasse geerbte Methoden org.apache.fulcrum.security.spi.AbstractManager
dispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, serviceVon Klasse geerbte Methoden org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Konstruktordetails
-
TorqueAbstractPermissionManager
public TorqueAbstractPermissionManager()
-
-
Methodendetails
-
configure
public void configure(org.apache.avalon.framework.configuration.Configuration conf) throws org.apache.avalon.framework.configuration.ConfigurationException Avalon Service lifecycle method- Angegeben von:
configurein Schnittstelleorg.apache.avalon.framework.configuration.Configurable- Setzt außer Kraft:
configurein KlasseAbstractEntityManager- Löst aus:
org.apache.avalon.framework.configuration.ConfigurationException
-
doSelectAllPermissions
protected abstract <T extends Permission> List<T> doSelectAllPermissions(Connection con) throws org.apache.torque.TorqueException Get all specialized Permissions- Parameter:
con- a database connection- Gibt zurück:
- a List of Permission instances
- Löst aus:
org.apache.torque.TorqueException- if any database error occurs
-
doSelectByName
protected abstract <T extends Permission> T doSelectByName(String name, Connection con) throws org.apache.torque.NoRowsException, org.apache.torque.TooManyRowsException, org.apache.torque.TorqueException Get a specialized Permission by name- Parameter:
name- the name of the groupcon- a database connection- Gibt zurück:
- a Permission instance
- Löst aus:
org.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 occurs
-
doSelectById
protected abstract <T extends Permission> T doSelectById(Integer id, Connection con) throws org.apache.torque.NoRowsException, org.apache.torque.TooManyRowsException, org.apache.torque.TorqueException Get a specialized Permission by id- Parameter:
id- the id of the groupcon- a database connection- Gibt zurück:
- a Permission instance
- Löst aus:
org.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 occurs
-
renamePermission
public void renamePermission(Permission permission, String name) throws DataBackendException, UnknownEntityException Renames an existing Permission.- Parameter:
permission- The object describing the permission to be renamed.name- the new name for the permission.- Löst aus:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if the permission does not exist.
-
removePermission
public void removePermission(Permission permission) throws DataBackendException, UnknownEntityException Removes a Permission from the system.- Parameter:
permission- The object describing the permission to be removed.- Löst aus:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if the permission does not exist.
-
persistNewPermission
Creates a new permission with specified attributes.- Angegeben von:
persistNewPermissionin KlasseAbstractPermissionManager- Parameter:
permission- the object describing the permission to be created.- Gibt zurück:
- a new Permission object that has id set up properly.
- Löst aus:
DataBackendException- if there was an error accessing the data backend.
-
getAllPermissions
Retrieves all permissions defined in the system.- Gibt zurück:
- the names of all roles defined in the system.
- Löst aus:
DataBackendException- if there was an error accessing the data backend.
-
checkExists
Determines if thePermissionexists in the security system.- Parameter:
permissionName- aPermissionvalue- Gibt zurück:
- true if the permission name exists in the system, false otherwise
- Löst aus:
DataBackendException- when more than one Permission with the same name exists.
-
getPermissionById
public <T extends Permission> T getPermissionById(Object id) throws DataBackendException, UnknownEntityException Retrieve a Permission object with specified id.- Angegeben von:
getPermissionByIdin SchnittstellePermissionManager- Setzt außer Kraft:
getPermissionByIdin KlasseAbstractPermissionManager- Parameter:
id- the id of the Permission.- Gibt zurück:
- an object representing the Permission with specified id.
- Löst aus:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if the permission does not exist.
-
getPermissionByName
public <T extends Permission> T getPermissionByName(String name) throws DataBackendException, UnknownEntityException Retrieve a Permission object with specified name.- Angegeben von:
getPermissionByNamein SchnittstellePermissionManager- Setzt außer Kraft:
getPermissionByNamein KlasseAbstractPermissionManager- Parameter:
name- the name of the Group.- Gibt zurück:
- an object representing the Group with specified name.
- Löst aus:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if the group does not exist.
-