Klasse TorqueAbstractRoleManager

java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
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, RoleManager, LazyLoadable
Bekannte direkte Unterklassen:
PeerRoleManager, TorqueDynamicRoleManagerImpl

public abstract class TorqueAbstractRoleManager extends AbstractRoleManager implements LazyLoadable
This implementation persists to a database via Torque.
Version:
$Id:$
Autor:
Thomas Vandahl
Siehe auch:
  • Felddetails

    • lazyLoading

      protected Boolean lazyLoading
  • Konstruktordetails

    • TorqueAbstractRoleManager

      public TorqueAbstractRoleManager()
  • 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:
      configure in Schnittstelle org.apache.avalon.framework.configuration.Configurable
      Setzt außer Kraft:
      configure in Klasse AbstractEntityManager
      Löst aus:
      org.apache.avalon.framework.configuration.ConfigurationException
    • doSelectAllRoles

      protected abstract <T extends Role> List<T> doSelectAllRoles(Connection con) throws org.apache.torque.TorqueException
      Get all specialized Roles
      Parameter:
      con - a database connection
      Gibt zurück:
      a List of Role instances
      Löst aus:
      org.apache.torque.TorqueException - if any database error occurs
    • doSelectByName

      protected abstract <T extends Role> T doSelectByName(String name, Connection con) throws org.apache.torque.NoRowsException, org.apache.torque.TooManyRowsException, org.apache.torque.TorqueException
      Get a specialized Role by name
      Parameter:
      name - the name of the group
      con - a database connection
      Gibt zurück:
      a Role instance
      Löst aus:
      org.apache.torque.NoRowsException - if no such group exists
      org.apache.torque.TooManyRowsException - if multiple groups with the given name exist
      org.apache.torque.TorqueException - if any database error occurs if any other database error occurs
    • doSelectById

      protected abstract <T extends Role> T doSelectById(Integer id, Connection con) throws org.apache.torque.NoRowsException, org.apache.torque.TooManyRowsException, org.apache.torque.TorqueException
      Get a specialized Role by id
      Parameter:
      id - the id of the group
      con - a database connection
      Gibt zurück:
      a Role instance
      Löst aus:
      org.apache.torque.NoRowsException - if no such group exists
      org.apache.torque.TooManyRowsException - if multiple groups with the given id exist
      org.apache.torque.TorqueException - if any database error occurs if any other database error occurs
    • renameRole

      public void renameRole(Role role, String name) throws DataBackendException, UnknownEntityException
      Renames an existing Role.
      Angegeben von:
      renameRole in Schnittstelle RoleManager
      Parameter:
      role - The object describing the role to be renamed.
      name - the new name for the role.
      Löst aus:
      DataBackendException - if there was an error accessing the data backend.
      UnknownEntityException - if the role does not exist.
    • persistNewRole

      protected <T extends Role> T persistNewRole(T role) throws DataBackendException
      Creates a new role with specified attributes.
      Angegeben von:
      persistNewRole in Klasse AbstractRoleManager
      Parameter:
      role - the object describing the role to be created.
      Gibt zurück:
      a new Role object that has id set up properly.
      Löst aus:
      DataBackendException - if there was an error accessing the data backend.
    • removeRole

      public void removeRole(Role role) throws DataBackendException, UnknownEntityException
      Removes a Role from the system.
      Angegeben von:
      removeRole in Schnittstelle RoleManager
      Parameter:
      role - The object describing the role to be removed.
      Löst aus:
      DataBackendException - if there was an error accessing the data backend.
      UnknownEntityException - if the role does not exist.
    • checkExists

      public boolean checkExists(String roleName) throws DataBackendException
      Determines if the Role exists in the security system.
      Angegeben von:
      checkExists in Schnittstelle RoleManager
      Parameter:
      roleName - a Role value
      Gibt zurück:
      true if the role name exists in the system, false otherwise
      Löst aus:
      DataBackendException - when more than one Role with the same name exists.
    • getAllRoles

      public RoleSet getAllRoles() throws DataBackendException
      Retrieves all roles defined in the system.
      Angegeben von:
      getAllRoles in Schnittstelle RoleManager
      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.
    • getRoleById

      public <T extends Role> T getRoleById(Object id) throws DataBackendException, UnknownEntityException
      Retrieve a Role object with specified id.
      Angegeben von:
      getRoleById in Schnittstelle RoleManager
      Setzt außer Kraft:
      getRoleById in Klasse AbstractRoleManager
      Parameter:
      id - the id of the Role.
      Gibt zurück:
      an object representing the Role with specified id.
      Löst aus:
      DataBackendException - if there was an error accessing the data backend.
      UnknownEntityException - if the role does not exist.
    • getRoleByName

      public <T extends Role> T getRoleByName(String name) throws DataBackendException, UnknownEntityException
      Retrieve a Role object with specified name.
      Angegeben von:
      getRoleByName in Schnittstelle RoleManager
      Setzt außer Kraft:
      getRoleByName in Klasse AbstractRoleManager
      Parameter:
      name - the name of the Role.
      Gibt zurück:
      an object representing the Role with specified name.
      Löst aus:
      DataBackendException - if there was an error accessing the data backend.
      UnknownEntityException - if the role does not exist.
    • getLazyLoading

      public Boolean getLazyLoading()
      Angegeben von:
      getLazyLoading in Schnittstelle LazyLoadable
    • setLazyLoading

      public void setLazyLoading(Boolean lazyLoading)
      Angegeben von:
      setLazyLoading in Schnittstelle LazyLoadable