@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 |
attendToEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Attend an event by an user
|
boolean |
checkEventAtendance(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Checks if the authenticated user is already attending the given event.
|
boolean |
checkIsCreator(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Checks if the authenticated user is the given event creator.
|
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 |
findByLoginAndPassword(String user,
String password)
Gets the user from the database with the given login and password
|
es.uvigo.esei.dgss.teama.letta.entities.User |
findByName(String login)
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.
|
es.uvigo.esei.dgss.teama.letta.entities.User |
loggingUser()
Return the user logged
|
void |
preRegistration(es.uvigo.esei.dgss.teama.letta.entities.User user)
Generates a verification token used to confirm the registration later.
|
es.uvigo.esei.dgss.teama.letta.entities.Event |
unAttendToEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Unfollow an event by an user
|
@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 loggingUser()
@PermitAll public es.uvigo.esei.dgss.teama.letta.entities.User findByName(String login)
login - a string with the user's login@PermitAll public es.uvigo.esei.dgss.teama.letta.entities.Event attendToEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event) throws Exception
event - the event to attendException - if event is empty or user is already attending the eventpublic es.uvigo.esei.dgss.teama.letta.entities.Event unAttendToEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws Exception
event - the event to unfollowException - if event is null value@PermitAll public boolean checkEventAtendance(es.uvigo.esei.dgss.teama.letta.entities.Event event) throws Exception
event - event to attend.Exception - if the given event is null@PermitAll public boolean checkIsCreator(es.uvigo.esei.dgss.teama.letta.entities.Event event) throws Exception
event - event to check its creator.Exception - if the given event is null@PermitAll public es.uvigo.esei.dgss.teama.letta.entities.User findByLoginAndPassword(String user, String password)
user - a string with the user's loginpassword - a string with the user's passwordCopyright © 2017. All rights reserved.