@RolesAllowed(value={"ADMIN","USER"}) public class UserService extends Object
| Constructor and Description |
|---|
UserService() |
| Modifier and Type | Method and Description |
|---|---|
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. |
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.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 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.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.Copyright © 2017. All rights reserved.