Schnittstelle UserManager

Alle Superschnittstellen:
Serializable
Alle bekannten Unterschnittstellen:
TurbineUserManager
Alle bekannten Implementierungsklassen:
AbstractUserManager

public interface UserManager extends Serializable
An UserManager performs User objects related tasks on behalf of the BaseSecurityService. The responsibilities of this class include loading data of an user from the storage and putting them into the User objects, saving those data to the permanent storage, and authenticating users.
Version:
$Id$
Autor:
Eric Pugh, Rafal Krzewski
  • 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 User>
    T
    addUser(T user, String password)
    Creates new user account with specified attributes.
    void
    authenticate(User user, String password)
    Authenticate an User with the specified password.
    void
    changePassword(User user, String oldPassword, String newPassword)
    Change the password for an User.
    boolean
    checkExists(String userName)
    Check whether a specified user's account exists.
    boolean
    Determines if the User exists in the security system.
    void
    forcePassword(User user, String password)
    Forcibly sets new password for an User.
    <T extends AccessControlList>
    T
    getACL(User user)
    Return a Class object representing the system's chosen implementation of of ACL interface.
    <T extends User>
    UserSet<T>
    Retrieves all users defined in the system.
    <T extends User>
    T
    getUser(String username)
    Retrieve a user from persistent storage using username as the key.
    <T extends User>
    T
    getUser(String username, String password)
    Retrieve a user from persistent storage using username as the key, and authenticate the user.
    <T extends User>
    T
    Retrieve a user from persistent storage using the id as the key.
    <T extends User>
    T
    Construct a blank User object.
    <T extends User>
    T
    Construct a blank User object.
    void
    Removes an user account from the system.
    <T extends User>
    UserSet<T>
    Retrieve a list of users that meet the specified criteria.
    void
    saveUser(User user)
    Saves User's data in the permanent storage.
  • Felddetails

    • ROLE

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

    • getUserInstance

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

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

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

      boolean checkExists(String userName) throws DataBackendException
      Check whether a specified user's account exists. The login name is used for looking up the account.
      Parameter:
      userName - The name of the user to be checked.
      Gibt zurück:
      true if the specified account exists
      Löst aus:
      DataBackendException - if there was an error accessing the data backend.
    • getUser

      <T extends User> T getUser(String username) throws UnknownEntityException, DataBackendException
      Retrieve a user from persistent storage using username as the key.
      Typparameter:
      T - User
      Parameter:
      username - the name of the user.
      Gibt zurück:
      an User object.
      Löst aus:
      UnknownEntityException - if the user's record does not exist in the database.
      DataBackendException - if there is a problem accessing the storage.
    • getUserById

      <T extends User> T getUserById(Object id) throws UnknownEntityException, DataBackendException
      Retrieve a user from persistent storage using the id as the key.
      Typparameter:
      T - User
      Parameter:
      id - the id of the user.
      Gibt zurück:
      an User object.
      Löst aus:
      UnknownEntityException - if the user's record does not exist in the database.
      DataBackendException - if there is a problem accessing the storage.
    • getUser

      <T extends User> T getUser(String username, String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException
      Retrieve a user from persistent storage using username as the key, and authenticate the user. The implementation may chose to authenticate to the server as the user whose data is being retrieved.
      Typparameter:
      T - User
      Parameter:
      username - the name of the user.
      password - the user supplied password.
      Gibt zurück:
      an User object.
      Löst aus:
      PasswordMismatchException - if the supplied password was incorrect.
      UnknownEntityException - if the user's record does not exist in the database.
      DataBackendException - if there is a problem accessing the storage.
    • getAllUsers

      <T extends User> UserSet<T> getAllUsers() throws DataBackendException
      Retrieves all users defined in the system.
      Typparameter:
      T - User type
      Gibt zurück:
      the names of all users defined in the system.
      Löst aus:
      DataBackendException - if there was an error accessing the data backend.
    • retrieveUserList

      <T extends User> UserSet<T> retrieveUserList(Object criteria) throws DataBackendException
      Retrieve a list of users that meet the specified criteria.
      Parameter:
      criteria - The criteria of selection.
      Gibt zurück:
      a List of users meeting the criteria.
      Löst aus:
      DataBackendException - if there is a problem accessing the storage.
    • saveUser

      void saveUser(User user) throws UnknownEntityException, DataBackendException
      Saves User's data in the permanent storage. The user account is required to exist in the storage.
      Parameter:
      user - the user object to save
      Löst aus:
      UnknownEntityException - if the user's account does not exist in the database.
      DataBackendException - if there is a problem accessing the storage.
    • authenticate

      Authenticate an User with the specified password. If authentication is successful the method returns nothing. If there are any problems, exception was thrown.
      Parameter:
      user - an User object to authenticate.
      password - the user supplied password.
      Löst aus:
      PasswordMismatchException - if the supplied password was incorrect.
      UnknownEntityException - if the user's record does not exist in the database.
      DataBackendException - if there is a problem accessing the storage.
    • addUser

      <T extends User> T addUser(T user, String password) throws EntityExistsException, DataBackendException
      Creates new user account with specified attributes.
      Parameter:
      user - the object describing account to be created.
      password - The password to use for the object creation
      Gibt zurück:
      User the user added
      Löst aus:
      DataBackendException - if there was an error accessing the data backend.
      EntityExistsException - if the user account already exists.
    • removeUser

      void removeUser(User user) throws UnknownEntityException, DataBackendException
      Removes an user account from the system.
      Parameter:
      user - the object describing the account to be removed.
      Löst aus:
      DataBackendException - if there was an error accessing the data backend.
      UnknownEntityException - if the user account is not present.
    • changePassword

      void changePassword(User user, String oldPassword, String newPassword) throws PasswordMismatchException, UnknownEntityException, DataBackendException
      Change the password for an User.
      Parameter:
      user - an User to change password for.
      oldPassword - the current password suplied by the user.
      newPassword - the current password requested by the user.
      Löst aus:
      PasswordMismatchException - if the supplied password was incorrect.
      UnknownEntityException - if the user's record does not exist in the database.
      DataBackendException - if there is a problem accessing the storage.
    • forcePassword

      void forcePassword(User user, String password) throws UnknownEntityException, DataBackendException
      Forcibly sets new password for an User. This is supposed by the administrator to change the forgotten or compromised passwords. Certain implementatations of this feature would require administrative level access to the authenticating server / program.
      Parameter:
      user - an User to change password for.
      password - the new password.
      Löst aus:
      UnknownEntityException - if the user's record does not exist in the database.
      DataBackendException - if there is a problem accessing the storage.
    • getACL

      <T extends AccessControlList> T getACL(User user) throws UnknownEntityException
      Return a Class object representing the system's chosen implementation of of ACL interface.
      Typparameter:
      T - AccessControlList
      Parameter:
      user - the user
      Gibt zurück:
      systems's chosen implementation of ACL interface.
      Löst aus:
      UnknownEntityException - if the implementation of ACL interface could not be determined, or does not exist.