Interface UserProvider
-
- All Known Implementing Classes:
DefaultUserProvider
public interface UserProvider
In charge of providing users.- Author:
- Yohann Chastagnier
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static UserProvider
get()
Gets the instance of the implementation of the interface.default User
getCurrentRequester()
Gets the user that is behind the current request in Silverpeas.default User
getMainAdministrator()
Gets the main administrator of Silverpeas.User
getSystemUser()
Gets the system user in Silverpeas.User
getUser(String userId)
Gets a user from the specified identifier.User
getUserByLoginAndDomainId(String login, String domainId)
Gets a user from his login and from the domain he belongs to.User
getUserByToken(String token)
Gets a user from his unique API token.
-
-
-
Method Detail
-
get
static UserProvider get()
Gets the instance of the implementation of the interface.- Returns:
- an implementation of
UserProvider
.
-
getUser
User getUser(String userId)
Gets a user from the specified identifier.- Parameters:
userId
- a user identifier as string.- Returns:
- a user instance of
User
or null if no such user exists.
-
getUserByToken
User getUserByToken(@Nonnull String token)
Gets a user from his unique API token.- Parameters:
token
- the API toke of a user.- Returns:
- a user instance of
User
or null if no such user exists.
-
getUserByLoginAndDomainId
User getUserByLoginAndDomainId(@Nonnull String login, @Nonnull String domainId)
Gets a user from his login and from the domain he belongs to.- Parameters:
login
- the login of the user.domainId
- the unique identifier of the domain he belongs to.- Returns:
- a user instance of
User
or null if no such user exists.
-
getCurrentRequester
default User getCurrentRequester()
Gets the user that is behind the current request in Silverpeas.- Returns:
- a user instance of
User
.
-
getMainAdministrator
default User getMainAdministrator()
Gets the main administrator of Silverpeas. It is a system account created during the installation of Silverpeas. This is by this system account that all the setting up of Silverpeas is performed (spaces, domains, application instances, ...).- Returns:
- the main administrator of Silverpeas.
-
getSystemUser
User getSystemUser()
Gets the system user in Silverpeas. A system user is virtual one under which some processes are performed like the batches one.- Returns:
- the system user of Silverpeas (a virtual user, id est without any user account)
-
-