public interface UserService
| 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 |
|---|---|
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,
UserService.UserSearchScope searchScope)
Finds the
User that matches the given predicate. |
com.google.common.collect.ImmutableList<User> |
findUsers(com.edorasware.commons.core.query.Predicate predicate,
UserService.UserSearchScope searchScope)
Finds the
Users that match the given predicate. |
com.edorasware.commons.core.entity.UserId |
getSystemAdminUserId()
Returns the id of the system admin 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.
|
User getUser(com.edorasware.commons.core.entity.UserId userId)
User with the given id.userId - the user id, not nullIllegalArgumentException - if the given user id is 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, UserService.UserSearchScope searchScope)
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(com.edorasware.commons.core.query.Predicate predicate, UserService.UserSearchScope searchScope)
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 nullcom.edorasware.commons.core.entity.UserId getSystemAdminUserId()
IllegalStateException - if none or more than one system admin 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.