@RolesAllowed(value={"ADMIN","USER"}) public class UserService extends Object
| Constructor and Description |
|---|
UserService() |
| Modifier and Type | Method and Description |
|---|---|
void |
activateUser(String login)
Activates a user
|
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User |
create(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User user)
Creates a new user
|
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User |
findByUserEmail(String email)
Returns user with a specified email.
|
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User |
findByUserLogin(String login)
Returns user with a specified login.
|
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User |
get(String login)
Returns the user identified by
login. |
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User |
getByUUID(String uuid)
Returns user with a specific activation UUID
|
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User |
getWithManagedPlayers(String login)
Returns the user identified by
login with the list of players that
the user manages. |
List<es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User> |
list()
Returns the complete list of users
|
void |
remove(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User user)
Deletes an user.
|
es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User |
update(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User user)
Updates the information of this user.
|
@PermitAll public es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User create(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User user)
user - a new user to be storedIllegalArgumentException - if user is nullpublic es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User update(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User user)
user - a user to be updated.IllegalArgumentException - if user is null.public void remove(es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User user)
user - the user to be deleted.IllegalArgumentException - if user if null.javax.ejb.EJBAccessException - if the user is not the current user does not have access to do
this action.@PermitAll public es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User get(String login)
login. If there is no user with the
specified login, null will be returned.login - the login of an user.null if there is no user
with the specified login.IllegalArgumentException - if login is null or it does not identifies a
valid user.public es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User getWithManagedPlayers(String login)
login with the list of players that
the user manages. If there is no user with the specified login, null
will be returned.login - the login of an user.null if there is no user with the
specified login.IllegalArgumentException - if login is null or it does not identifies a
valid user.public List<es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User> list()
public es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User findByUserLogin(String login)
login - the login of the userIllegalArgumentException - if login is null or it does not identifies a
valid user.@PermitAll public es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User findByUserEmail(String email)
email - the email of the userIllegalArgumentException - if email is null or it does not identifies a
valid user.@PermitAll public es.uvigo.esei.dgss.teamb.ligaaas.domain.entities.User getByUUID(String uuid)
uuid - the activation UUID of the user we want to findIllegalArgumentException - if uuid is null or it does not identifies a valid
user.@PermitAll public void activateUser(String login)
login - the login of the user to activateIllegalArgumentException - if login is null or it does not identifies a
valid user.Copyright © 2018. All rights reserved.