Interface UserDirectory

All Known Subinterfaces:
ModifiableUserDirectory
All Known Implementing Classes:
AADUserDirectory, AbstractCachingUserDirectory, JdbcUserDirectory, LdapUserDirectory, StaticUserDirectory

public interface UserDirectory
Abstraction for getting users list and verify the presence of a particular user.
  • Method Details

    • getId

      A unique identifier
      Returns:
      The non-null and non-empty identifier
    • getLabel

      Get the label of the CredentialProvider
      Returns:
      The optionnal label
    • getUsers

      Get the list of all users of one directory.
      Returns:
      list of users as Collection of Users, empty if a problem occurs.
    • getUsers

      List<User> getUsers(int count, int offset, Map<String,Object> parameters)
      Get a list of users from a directory given the parameters
      Parameters:
      count - The limit of users to retrieve
      offset - The number of result to ignore before starting to collect users.
      parameters - A map of additional parameters, see implementation.
      Returns:
      The list of retrieved User
    • getUser

      Get a particular user by his login.
      Parameters:
      login - Login of the user to get. Cannot be null.
      Returns:
      User's information as a User instance or null if the user login does not exist.
    • getUserByEmail

      Get a particular user by his email (search should be case insensitive).
      Parameters:
      email - Email of the user to get. Cannot be null.
      Returns:
      User's information as a User instance or null if the user email does not exist.
      Throws:
      NotUniqueUserException - If many users match this email
    • getUserDirectoryModelId

      Get the id of the UserDirectoryModel extension point
      Returns:
      the id of extension point
    • getParameterValues

      Get the values of parameters (from user directory model)
      Returns:
      the parameters' values
    • init

      void init(String id, String udModelId, Map<String,Object> paramValues, String label) throws Exception
      Initialize the user's directory with given parameters' values.
      Parameters:
      id - The non-null and non-empty unique identifier
      udModelId - The id of user directory extension point
      paramValues - The parameters' values
      label - The optional label
      Throws:
      Exception - If an error occurred
    • setPopulationId

      void setPopulationId(String populationId)
      Set the value of the id of the population this user directory belong to.
      Parameters:
      populationId - The id of the population the user directory belongs to.
    • getPopulationId

      Get the id of the population this user directory belongs to.
      Returns:
      The id of the population
    • checkCredentials

      boolean checkCredentials(String login, String password)
      Authenticate a user with its credentials
      Parameters:
      login - The login to check. Cannot be null.
      password - The password to check.
      Returns:
      true if the user is authenticated, false otherwise.
    • isCaseSensitive

      default boolean isCaseSensitive()
      Is the user directory case sensitive for login?
      Returns:
      true is the user directory is case sensitive