| Constructor and Description |
|---|
UserEJB() |
| Modifier and Type | Method and Description |
|---|---|
Long |
countUnreadNotifications()
Count the unread
UserNotifications by the current User. |
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. |
es.uvigo.esei.dgss.letta.domain.entities.UserNotifications |
getNotification(int notificationId)
Find a
UserNotifications in the database. |
List<es.uvigo.esei.dgss.letta.domain.entities.UserNotifications> |
getNotifications()
Get all the
UserNotifications by the current User. |
List<es.uvigo.esei.dgss.letta.domain.entities.User> |
getUsers()
Gets all the
User in the database. |
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
|
void |
removeUser(String login)
Remove the
User in the database. |
es.uvigo.esei.dgss.letta.domain.entities.User |
update(es.uvigo.esei.dgss.letta.domain.entities.User user) |
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={"ADMIN","USER"}) public es.uvigo.esei.dgss.letta.domain.entities.User update(es.uvigo.esei.dgss.letta.domain.entities.User user) throws IllegalArgumentException, SecurityException, EmailDuplicateException
@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.@RolesAllowed(value="ADMIN") public void removeUser(String login) throws IllegalArgumentException, SecurityException
User in the database.login - the User login.IllegalArgumentException - if the User is null.SecurityException - if the currently identified User is not found
in the database.@RolesAllowed(value={"ADMIN","USER"}) public List<es.uvigo.esei.dgss.letta.domain.entities.UserNotifications> getNotifications()
UserNotifications by the current User.UserNotifications.@RolesAllowed(value={"ADMIN","USER"}) public Long countUnreadNotifications()
UserNotifications by the current User.UserNotifications@RolesAllowed(value={"ADMIN","USER"}) public es.uvigo.esei.dgss.letta.domain.entities.UserNotifications getNotification(int notificationId)
UserNotifications in the database.notificationId - the id of the UserNotifications.UserNotifications.Copyright © 2016. All rights reserved.