@Named(value="homeController") public class HomeController extends Object
| Constructor and Description |
|---|
HomeController()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
attendEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Attend event by user.
|
boolean |
attendEvents()
Returns true if the user is not logged in to any event
|
void |
cancelEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Cancel an event by its creator.
|
List<es.uvigo.esei.dgss.teama.letta.entities.Event> |
getEvents()
Gets the last twenty events ordered by date.
|
String |
getIcon(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Return a icon to show with library.
|
Collection<es.uvigo.esei.dgss.teama.letta.entities.Event> |
getMainEvents()
Gets the five main events.
|
boolean |
isANewEvent(Date date)
Return true if the event starts in less than two days
|
boolean |
isAttending(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Check if an user is attending an event
|
boolean |
isCreator(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Check if the logged user is the creator of an event
|
boolean |
isSameProvince(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Check if an user is same province that event
|
void |
unAttendEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Unnattend an event by an user.
|
public Collection<es.uvigo.esei.dgss.teama.letta.entities.Event> getMainEvents()
Eventpublic List<es.uvigo.esei.dgss.teama.letta.entities.Event> getEvents()
Eventpublic void attendEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws Exception
event - event to attend by userException - event received as null value or event just is
attending by userpublic boolean isAttending(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws Exception
event - event to checkException - if event is received as null valuepublic boolean isSameProvince(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws Exception
event - event to checkException - if event is received as null valuepublic boolean isCreator(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws Exception
event - event to checkException - if event is received as null valuepublic void unAttendEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws Exception
event - event to unnattendException - event received as null valuepublic void cancelEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws Exception
event - event to cancelException - event received as null valuepublic String getIcon(es.uvigo.esei.dgss.teama.letta.entities.Event event)
event - event with the category to checkpublic boolean isANewEvent(Date date)
date - date of the event startpublic boolean attendEvents()
Copyright © 2017. All rights reserved.