Interface UserManager

    • Field Detail

      • ROLE

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

      • 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.
        Type Parameters:
        T - User type
        Returns:
        an object implementing User interface.
        Throws:
        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.
        Type Parameters:
        T - User
        Parameters:
        userName - The name of the user.
        Returns:
        an object implementing User interface.
        Throws:
        DataBackendException - if the object could not be instantiated.
      • checkExists

        boolean checkExists​(User user)
                     throws DataBackendException
        Determines if the User exists in the security system.
        Parameters:
        user - a User value
        Returns:
        true if the user exists in the system, false otherwise
        Throws:
        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.
        Parameters:
        userName - The name of the user to be checked.
        Returns:
        true if the specified account exists
        Throws:
        DataBackendException - if there was an error accessing the data backend.
      • getAllUsers

        <T extends UserUserSet<T> getAllUsers()
                                         throws DataBackendException
        Retrieves all users defined in the system.
        Type Parameters:
        T - User type
        Returns:
        the names of all users defined in the system.
        Throws:
        DataBackendException - if there was an error accessing the data backend.
      • addUser

        <T extends User> T addUser​(T user,
                                   String password)
                            throws EntityExistsException,
                                   DataBackendException
        Creates new user account with specified attributes.
        Parameters:
        user - the object describing account to be created.
        password - The password to use for the object creation
        Returns:
        User the user added
        Throws:
        DataBackendException - if there was an error accessing the data backend.
        EntityExistsException - if the user account already exists.
      • 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.
        Parameters:
        user - an User to change password for.
        password - the new password.
        Throws:
        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.
        Type Parameters:
        T - AccessControlList
        Parameters:
        user - the user
        Returns:
        systems's chosen implementation of ACL interface.
        Throws:
        UnknownEntityException - if the implementation of ACL interface could not be determined, or does not exist.