| Constructor and Description |
|---|
UserEJB() |
| Modifier and Type | Method and Description |
|---|---|
Optional<es.uvigo.esei.dgss.letta.domain.entities.User> |
get(String login)
Retrieves the
User associated with the received login name,
returned as an Optional value that will be empty if the user is
not found. |
Optional<es.uvigo.esei.dgss.letta.domain.entities.User> |
getByEmail(String email)
Retrieves the
User associated with the received email, returned
as an Optional value that will be empty if the user is not found. |
List<es.uvigo.esei.dgss.letta.domain.entities.User> |
getUsers()
Gets all the
User in the database. |
void |
modifyProfile(es.uvigo.esei.dgss.letta.domain.entities.User user)
Modifies the current
User profile data |
void |
registerUser(es.uvigo.esei.dgss.letta.domain.entities.Registration registration)
Register an user
|
es.uvigo.esei.dgss.letta.domain.entities.Registration |
registrationWithLogin(String login)
Finds a registration by login
|
boolean |
userConfirmation(String uuid)
Confirms a user registration
|
es.uvigo.esei.dgss.letta.domain.entities.User |
userWithLogin(String login)
Deprecated.
Consider using
get(String) instead, as it
already checks the failure case where the User is not
found, by returning it as an Optional value. |
@PermitAll public Optional<es.uvigo.esei.dgss.letta.domain.entities.User> get(String login) throws IllegalArgumentException
User associated with the received login name,
returned as an Optional value that will be empty if the user is
not found. If the login is null, a NullPointerException will be
thrown.login - The login String to find in the database.Optional value holding the uniquely found User
object, or empty otherwise.IllegalArgumentException - if the received login is null.@PermitAll public Optional<es.uvigo.esei.dgss.letta.domain.entities.User> getByEmail(String email) throws IllegalArgumentException
User associated with the received email, returned
as an Optional value that will be empty if the user is not found.
If the email is null, a NullPointerException will be thrown/email - The email String to find in the database.Optional value holding the uniquely found
User, or empty otherwise.IllegalArgumentException - if the received email is null.@PermitAll public void registerUser(es.uvigo.esei.dgss.letta.domain.entities.Registration registration) throws LoginDuplicateException, EmailDuplicateException, javax.mail.MessagingException
registration - indicates the user to registerLoginDuplicateException - if the user login already existsEmailDuplicateException - if the user email already existsjavax.mail.MessagingException - exception thrown by the Messaging classes@PermitAll public boolean userConfirmation(String uuid)
uuid - indicates the user uuiduuid doesn't exist@Deprecated public es.uvigo.esei.dgss.letta.domain.entities.User userWithLogin(String login)
get(String) instead, as it
already checks the failure case where the User is not
found, by returning it as an Optional value.login - indicates the user with login@PermitAll public es.uvigo.esei.dgss.letta.domain.entities.Registration registrationWithLogin(String login)
login - indicates the user with login@RolesAllowed(value="USER") public void modifyProfile(es.uvigo.esei.dgss.letta.domain.entities.User user) throws EmailDuplicateException
User profile datauser - User object that contains the new data.EmailDuplicateException - if the new email is yet in the system@RolesAllowed(value="ADMIN") public List<es.uvigo.esei.dgss.letta.domain.entities.User> getUsers()
User in the database.List with all the User sorted alphabetically.Copyright © 2015. All rights reserved.