public interface UserManager
Manager to retrieve current user information. All APIs are restricted to the current tenant unless specifically noted otherwise.
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)
Finds the
User that matches the given predicate. |
Optional<User> |
findUserAcrossAllTenants(Predicate predicate)
Finds the
User that matches the given predicate across all tenants. |
com.google.common.collect.ImmutableList<User> |
findUsers(Predicate predicate)
Finds the
User s that match the given predicate. |
User |
getCurrentSystemAdminUser()
Returns the current system admin user.
|
String |
getCurrentSystemAdminUserId()
Returns the id of the current system admin user.
|
String |
getCurrentTenantId()
Returns the id of the current tenant.
|
User |
getCurrentUser()
Returns the current user.
|
String |
getCurrentUserId()
Returns the id of the current 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.
|
String getCurrentTenantId()
Returns the id of the current tenant.
String getCurrentUserId()
Returns the id of the current user.
User getCurrentUser()
Returns the current user.
String getCurrentSystemAdminUserId()
Returns the id of the current system admin user.
User getCurrentSystemAdminUser()
Returns the current system admin user.
User getUser(String userId)
Returns the user with the given id.
userId
- the user id, not 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)
Finds the User
that matches the given predicate.
predicate
- the predicate to apply, never nullIllegalStateException
- if more than one matching user is foundcom.google.common.collect.ImmutableList<User> findUsers(Predicate predicate)
Finds the User
s that match the given predicate.
predicate
- the predicate to apply, never nullOptional<User> findUserAcrossAllTenants(Predicate predicate)
Finds the User
that matches the given predicate across all tenants.
predicate
- the predicate to apply, never nullIllegalStateException
- if more than one matching 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 - 2019 edorasware ag. All Rights Reserved.