public interface UserManager
| Modifier and Type | Method and Description |
|---|---|
com.edorasware.commons.core.entity.UserId |
createUser(User user)
Persists the given
User object as an AnyWorkObject with type User.ENTITY_TYPE and
the predefined user variables. |
com.google.common.base.Optional<User> |
findUser(com.edorasware.commons.core.query.Predicate predicate)
Finds the
User that matches the given predicate. |
com.google.common.base.Optional<User> |
findUserAcrossAllTenants(com.edorasware.commons.core.query.Predicate predicate)
Finds the
User that matches the given predicate across all tenants. |
com.google.common.collect.ImmutableList<User> |
findUsers(com.edorasware.commons.core.query.Predicate predicate)
Finds the
Users that match the given predicate. |
User |
getCurrentSystemAdminUser()
Returns the current system admin user.
|
com.edorasware.commons.core.entity.UserId |
getCurrentSystemAdminUserId()
Returns the id of the current system admin user.
|
com.edorasware.commons.core.entity.TenantId |
getCurrentTenantId()
Returns the id of the current tenant.
|
User |
getCurrentUser()
Returns the current user.
|
com.edorasware.commons.core.entity.UserId |
getCurrentUserId()
Returns the id of the current user.
|
User |
getUser(com.edorasware.commons.core.entity.UserId userId)
Returns the user with the given id.
|
void |
setActive(com.edorasware.commons.core.entity.UserId userId,
boolean isActive)
Set the state of the user object.
|
com.edorasware.commons.core.entity.UserId |
updateUser(User user)
Updates an already persisted user.
|
com.edorasware.commons.core.entity.TenantId getCurrentTenantId()
com.edorasware.commons.core.entity.UserId getCurrentUserId()
User getCurrentUser()
com.edorasware.commons.core.entity.UserId getCurrentSystemAdminUserId()
User getCurrentSystemAdminUser()
User getUser(com.edorasware.commons.core.entity.UserId userId)
userId - the user id, not nullcom.edorasware.commons.core.entity.EntityNotFoundException - if a user with the given id does not existvoid setActive(com.edorasware.commons.core.entity.UserId userId,
boolean isActive)
userId - the user id, not nullisActive - true if the user gets activated, false otherwisecom.google.common.base.Optional<User> findUser(com.edorasware.commons.core.query.Predicate predicate)
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(com.edorasware.commons.core.query.Predicate predicate)
Users that match the given predicate.predicate - the predicate to apply, never nullcom.google.common.base.Optional<User> findUserAcrossAllTenants(com.edorasware.commons.core.query.Predicate predicate)
User that matches the given predicate across all tenants.predicate - the predicate to apply, never nullIllegalStateException - if more than one matching user is foundcom.edorasware.commons.core.entity.UserId createUser(User user)
User object as an AnyWorkObject with type User.ENTITY_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 usercom.edorasware.commons.core.entity.UserId updateUser(User user)
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 - 2017 edorasware ag. All Rights Reserved.