Schnittstelle RoleManager

Alle Superschnittstellen:
Serializable
Alle bekannten Implementierungsklassen:
AbstractRoleManager

public interface RoleManager extends Serializable
A RoleManager performs Role objects related tasks on behalf of the BaseSecurityService. The responsibilities of this class include loading data of a role from the storage and putting them into the Role objects, saving those data to the permanent storage.
Version:
$Id$
Autor:
Eric Pugh
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final String
    Avalon role - used to id the component within the manager
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    <T extends Role>
    T
    addRole(T role)
    Creates a new role with specified attributes.
    boolean
    checkExists(String roleName)
    Determines if a Role exists in the security system with the specified role name.
    boolean
    Determines if the Role exists in the security system.
    Retrieves all roles defined in the system.
    <T extends Role>
    T
    Retrieve a Role object with specified Id.
    <T extends Role>
    T
    Retrieve a Role object with specified name.
    <T extends Role>
    T
    Construct a blank Role object This method calls getRoleClass, and then creates a new object using the default constructor.
    <T extends Role>
    T
    Construct a blank Role object.
    void
    Removes a Role from the system.
    void
    renameRole(Role role, String name)
    Renames an existing Role.
  • Felddetails

    • ROLE

      static final String ROLE
      Avalon role - used to id the component within the manager
  • Methodendetails

    • getRoleInstance

      <T extends Role> T getRoleInstance() throws DataBackendException
      Construct a blank Role object This method calls getRoleClass, and then creates a new object using the default constructor.
      Typparameter:
      T - role type
      Gibt zurück:
      an object implementing Role interface.
      Löst aus:
      DataBackendException - if the object could not be instantiated
    • getRoleInstance

      <T extends Role> T getRoleInstance(String roleName) throws DataBackendException
      Construct a blank Role object. This method calls getRoleClass, and then creates a new object using the default constructor.
      Typparameter:
      T - Role
      Parameter:
      roleName - The name of the Role
      Gibt zurück:
      an object implementing Role interface.
      Löst aus:
      DataBackendException - if the object could not be instantiated.
    • getRoleByName

      <T extends Role> T getRoleByName(String name) throws DataBackendException, UnknownEntityException
      Retrieve a Role object with specified name.
      Typparameter:
      T - Role
      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.
    • getRoleById

      <T extends Role> T getRoleById(Object id) throws DataBackendException, UnknownEntityException
      Retrieve a Role object with specified Id.
      Typparameter:
      T - Role
      Parameter:
      id - the Id of the Role.
      Gibt zurück:
      an object representing the Role with specified name.
      Löst aus:
      UnknownEntityException - if the permission does not exist in the database.
      DataBackendException - if there is a problem accessing the storage.
    • getAllRoles

      RoleSet getAllRoles() throws DataBackendException
      Retrieves all roles 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.
    • addRole

      <T extends Role> T addRole(T role) throws DataBackendException, EntityExistsException
      Creates a new role with specified attributes.
      Typparameter:
      T - Role
      Parameter:
      role - The object describing the role to be created.
      Gibt zurück:
      the new Role object.
      Löst aus:
      DataBackendException - if there was an error accessing the data backend.
      EntityExistsException - if the role already exists.
    • removeRole

      void removeRole(Role role) throws DataBackendException, UnknownEntityException
      Removes a Role from the system.
      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.
    • renameRole

      void renameRole(Role role, String name) throws DataBackendException, UnknownEntityException
      Renames an existing Role.
      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.
    • checkExists

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

      boolean checkExists(String roleName) throws DataBackendException
      Determines if a Role exists in the security system with the specified role name.
      Parameter:
      roleName - the name of a Role to check.
      Gibt zurück:
      true if the role exists in the system, false otherwise
      Löst aus:
      DataBackendException - when more than one Role with the same name exists.