@RolesAllowed(value="RegisteredUser") public class UserEJB extends Object
| Constructor and Description |
|---|
UserEJB() |
| Modifier and Type | Method and Description |
|---|---|
es.uvigo.esei.dgss.teama.letta.entities.Event |
assistToEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Follow an event by an user
|
boolean |
checkIsFollowing(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Checks if the authenticated user is already following the given event.
|
es.uvigo.esei.dgss.teama.letta.entities.User |
confirmRegistration(String t)
Confirms a pre-registered user through the given token.
|
es.uvigo.esei.dgss.teama.letta.entities.User |
findByName(String user)
Gets the user from the database with the given login
|
boolean |
isRegistered(String login)
Checks if the given user login is registered in the system.
|
void |
preRegistration(es.uvigo.esei.dgss.teama.letta.entities.User user)
Generates a verification token used to confirm the registration later.
|
@PermitAll public boolean isRegistered(String login)
login - login of the user.User@PermitAll public void preRegistration(es.uvigo.esei.dgss.teama.letta.entities.User user) throws javax.mail.MessagingException
user - the user that will be pre-registered.javax.mail.MessagingException - when an error to send message is produced.User,
VerificationToken,
confirmRegistration(String)@PermitAll public es.uvigo.esei.dgss.teama.letta.entities.User confirmRegistration(String t)
t - the VerificationToken id.InvalidParameterException - when the given token is not valid.@PermitAll public es.uvigo.esei.dgss.teama.letta.entities.User findByName(String user)
user - a string with the user's loginpublic es.uvigo.esei.dgss.teama.letta.entities.Event assistToEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws Exception
event - the event to followException - if event is empty or user is already following the event@PermitAll public boolean checkIsFollowing(es.uvigo.esei.dgss.teama.letta.entities.Event event) throws Exception
event - event to follow.Exception - if the given event is nullCopyright © 2016. All rights reserved.