Package org.ametys.core.user.directory
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 Summary
Modifier and TypeMethodDescriptionboolean
checkCredentials
(String login, String password) Authenticate a user with its credentialsgetId()
A unique identifiergetLabel()
Get the label of the CredentialProviderGet the values of parameters (from user directory model)Get the id of the population this user directory belongs to.Get a particular user by his login.getUserByEmail
(String email) Get a particular user by his email (search should be case insensitive).Get the id of theUserDirectoryModel
extension pointgetUsers()
Get the list of all users of one directory.Get a list of users from a directory given the parametersvoid
Initialize the user's directory with given parameters' values.default boolean
Is the user directory case sensitive for login?void
setPopulationId
(String populationId) Set the value of the id of the population this user directory belong to.
-
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
User
s, empty if a problem occurs.
-
getUsers
Get a list of users from a directory given the parameters- Parameters:
count
- The limit of users to retrieveoffset
- 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 theUserDirectoryModel
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 ExceptionInitialize the user's directory with given parameters' values.- Parameters:
id
- The non-null and non-empty unique identifierudModelId
- The id of user directory extension pointparamValues
- The parameters' valueslabel
- The optional label- Throws:
Exception
- If an error occurred
-
setPopulationId
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
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
Is the user directory case sensitive for login?- Returns:
- true is the user directory is case sensitive
-