@RolesAllowed(value="RegisteredUser") public class EventEJB extends Object
| Constructor and Description |
|---|
EventEJB() |
| Modifier and Type | Method and Description |
|---|---|
List<es.uvigo.esei.dgss.teama.letta.entities.Event> |
avancedSearch(String creator,
String organizer,
String title,
String head,
String description,
es.uvigo.esei.dgss.teama.letta.entities.Category category,
String location,
String province,
Date start,
Date end) |
es.uvigo.esei.dgss.teama.letta.entities.Event |
cancelEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Cancel an event by its creator
|
boolean |
cheackIsOrganizedByFriend(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Checks if the event is organized by friend.
|
List<es.uvigo.esei.dgss.teama.letta.entities.User> |
checkFriendsAssistants(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Checks How many friends do you attend
|
es.uvigo.esei.dgss.teama.letta.entities.Event |
createEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event) |
boolean |
deleteEventByCreator(int id)
Delete an event by its creator
|
List<es.uvigo.esei.dgss.teama.letta.entities.Event> |
getAttendedEvents()
Gets events are marked as attended by the logged-in user.
|
List<es.uvigo.esei.dgss.teama.letta.entities.Capital> |
getCapitals()
Gets all the
Capital in the database. |
es.uvigo.esei.dgss.teama.letta.entities.Event |
getEventFromId(int id)
Get the event with a given id.
|
List<es.uvigo.esei.dgss.teama.letta.entities.Event> |
getEventsByIdAndUser(int id,
es.uvigo.esei.dgss.teama.letta.entities.User user) |
List<es.uvigo.esei.dgss.teama.letta.entities.Event> |
getMyEvents()
Get the event created by the user who is logged in the system
|
List<es.uvigo.esei.dgss.teama.letta.entities.Event> |
getTopEvents() |
List<es.uvigo.esei.dgss.teama.letta.entities.Event> |
getWallEvents() |
List<es.uvigo.esei.dgss.teama.letta.entities.Event> |
search(String searchTerm)
Gets events that match with the follow criteria: the search term appears
in the title or the search term appears in the description and the event
was not canceled.
|
List<String> |
searchAutocomplete(String searchTerm)
Gets the same events that search method but returns only titles of
events.
|
es.uvigo.esei.dgss.teama.letta.entities.Event |
updateEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Update an event by its organizer
|
es.uvigo.esei.dgss.teama.letta.entities.Event |
updateEventByCreator(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Update an event by its creator
|
@PermitAll public List<es.uvigo.esei.dgss.teama.letta.entities.Event> getTopEvents()
@PermitAll public List<es.uvigo.esei.dgss.teama.letta.entities.Event> getWallEvents()
@PermitAll public es.uvigo.esei.dgss.teama.letta.entities.Event createEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
event - event to be create with creator and organizer assigned@PermitAll public List<es.uvigo.esei.dgss.teama.letta.entities.Event> search(String searchTerm)
searchTerm - the search term used.@PermitAll public List<String> searchAutocomplete(String searchTerm)
searchTerm - the search term.search(String)@PermitAll public List<es.uvigo.esei.dgss.teama.letta.entities.Event> getAttendedEvents()
javax.ejb.EJBAccessException - when the logged-in user no exist.Event@RolesAllowed(value="RegisteredUser") public List<es.uvigo.esei.dgss.teama.letta.entities.Event> getMyEvents()
@PermitAll public es.uvigo.esei.dgss.teama.letta.entities.Event getEventFromId(int id)
id - if of event to search@PermitAll public es.uvigo.esei.dgss.teama.letta.entities.Event cancelEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event) throws LettaIllegalArgumentException
event - the event to attendLettaIllegalArgumentException - if event is empty or user is already attending the event@PermitAll public es.uvigo.esei.dgss.teama.letta.entities.Event updateEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
event - the event to updatejavax.ejb.EJBAccessException - when the logged-in user is not the organizer.@PermitAll public es.uvigo.esei.dgss.teama.letta.entities.Event updateEventByCreator(es.uvigo.esei.dgss.teama.letta.entities.Event event)
event - the event to updatejavax.ejb.EJBAccessException - when the logged-in user is not the organizer.@PermitAll public boolean deleteEventByCreator(int id)
id - from event to deletejavax.ejb.EJBAccessException - when the logged-in user is not the organizer.@PermitAll public List<es.uvigo.esei.dgss.teama.letta.entities.Event> getEventsByIdAndUser(int id, es.uvigo.esei.dgss.teama.letta.entities.User user)
@PermitAll public List<es.uvigo.esei.dgss.teama.letta.entities.Event> avancedSearch(String creator, String organizer, String title, String head, String description, es.uvigo.esei.dgss.teama.letta.entities.Category category, String location, String province, Date start, Date end)
@PermitAll public List<es.uvigo.esei.dgss.teama.letta.entities.Capital> getCapitals()
Capital in the database.List with all the Capital@PermitAll public boolean cheackIsOrganizedByFriend(es.uvigo.esei.dgss.teama.letta.entities.Event event)
event - the given event@PermitAll public List<es.uvigo.esei.dgss.teama.letta.entities.User> checkFriendsAssistants(es.uvigo.esei.dgss.teama.letta.entities.Event event)
event - the given eventCopyright © 2017. All rights reserved.