Package org.silverpeas.core.admin.user
Class DefaultUserProvider
- java.lang.Object
-
- org.silverpeas.core.admin.user.DefaultUserProvider
-
- All Implemented Interfaces:
UserProvider
@Provider public class DefaultUserProvider extends Object implements UserProvider
Implementation by default of theUserProvider
interface.- Author:
- Yohann Chastagnier
-
-
Constructor Summary
Constructors Constructor Description DefaultUserProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.admin.user.service.UserProvider
getCurrentRequester, getMainAdministrator
-
-
-
-
Method Detail
-
getUser
public User getUser(String userId)
Description copied from interface:UserProvider
Gets a user from the specified identifier.- Specified by:
getUser
in interfaceUserProvider
- Parameters:
userId
- a user identifier as string.- Returns:
- a user instance of
User
or null if no such user exists.
-
getUserByToken
public User getUserByToken(@Nonnull String token)
Description copied from interface:UserProvider
Gets a user from his unique API token.- Specified by:
getUserByToken
in interfaceUserProvider
- Parameters:
token
- the API toke of a user.- Returns:
- a user instance of
User
or null if no such user exists.
-
getUserByLoginAndDomainId
public User getUserByLoginAndDomainId(@Nonnull String login, @Nonnull String domainId)
Description copied from interface:UserProvider
Gets a user from his login and from the domain he belongs to.- Specified by:
getUserByLoginAndDomainId
in interfaceUserProvider
- 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.
-
getSystemUser
public User getSystemUser()
Description copied from interface:UserProvider
Gets the system user in Silverpeas. A system user is virtual one under which some processes are performed like the batches one.- Specified by:
getSystemUser
in interfaceUserProvider
- Returns:
- the system user of Silverpeas (a virtual user, id est without any user account)
-
-