@RolesAllowed(value="RegisteredUser") public class EventEJB extends Object
| Constructor and Description |
|---|
EventEJB() |
| Modifier and Type | Method and Description |
|---|---|
es.uvigo.esei.dgss.teama.letta.entities.Event |
cancelEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Cancel an event by its creator
|
es.uvigo.esei.dgss.teama.letta.entities.Event |
createEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event) |
List<es.uvigo.esei.dgss.teama.letta.entities.Event> |
getAttendedEvents()
Gets events are marked as attended by the logged-in user.
|
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> |
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
|
@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.Copyright © 2017. All rights reserved.