public interface UserService
Service that provides user related information.
| Modifier and Type | Interface and Description | 
|---|---|
static class  | 
UserService.UserSearchScope
Defines the scope in which to apply a user search. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
createUser(User user)
Persists the given  
User object as an AnyWorkObject with type WorkObjectTypes.USER_TYPE and
the predefined user variables. | 
Optional<User> | 
findUser(Predicate predicate,
        UserService.UserSearchScope searchScope)
Finds the  
User that matches the given predicate. | 
com.google.common.collect.ImmutableList<User> | 
findUsers(Predicate predicate,
         UserService.UserSearchScope searchScope)
Finds the  
Users that match the given predicate. | 
String | 
getSystemAdminUserId()
Returns the id of the system admin user. 
 | 
User | 
getUser(String userId)
Returns the  
User with the given id. | 
void | 
setActive(String userId,
         boolean isActive)
Set the state of the user object. 
 | 
String | 
updateUser(User user)
Updates an already persisted user. 
 | 
User getUser(String userId)
Returns the User with the given id.
userId - the user id, not nullIllegalArgumentException - if the given user id is nullEntityNotFoundException - if a user with the given id does not existvoid setActive(String userId, boolean isActive)
Set the state of the user object.
userId - the user id, not nullisActive - true if the user gets activated, false otherwiseOptional<User> findUser(Predicate predicate, UserService.UserSearchScope searchScope)
Finds the User that matches the given predicate.
predicate - the predicate to apply, never nullsearchScope - the boundaries within which to searchIllegalArgumentException - if the given predicate or search scope is nullIllegalStateException - if more than one matching user is foundcom.google.common.collect.ImmutableList<User> findUsers(Predicate predicate, UserService.UserSearchScope searchScope)
Finds the Users that match the given predicate.
predicate - the predicate to apply, never nullsearchScope - the boundaries within which to searchIllegalArgumentException - if the given predicate or search scope is nullString getSystemAdminUserId()
Returns the id of the system admin user. Note that in a multi-tenant environment, the system admin user id is different for each tenant.
IllegalStateException - if none or more than one system admin user is foundString createUser(User user)
Persists the given User object as an AnyWorkObject with type WorkObjectTypes.USER_TYPE and
the predefined user variables.
user - the user to be created, not nullIllegalArgumentException - if the given user is null or the given user email address is not validIllegalStateException - if a user is already persisted with the same login as the given userString updateUser(User user)
Updates an already persisted user. All user properties are updated except the following id’s: <ul> <li>User.id</li> <li>User.externalId</li> <li>User.tenantId</li> </ul>
user - the user to be updated, not nullIllegalArgumentException - if the given user is null, the id of the user is undefined or the given user email address is not validIllegalStateException - if the id of the given user is not already persisted or if a user is already persisted with the same login as the given userCopyright © 2010 - 2018 edorasware ag. All Rights Reserved.