@Named(value="searchController") @SessionScoped public class SearchController extends Object implements Serializable
| Constructor and Description |
|---|
SearchController()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attendEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
The user will attend the given event
|
List<String> |
autocomplete(String searchTerm)
Gets a list of events names with the term searched.
|
String |
doSearch()
Searches events that match with searchTerm attribute and redirects to
search_results page.
|
List<es.uvigo.esei.dgss.teama.letta.entities.Event> |
getResultEvents()
Gets the result of search.
|
String |
getSearchTerm()
Gets the search term.
|
boolean |
isAttending(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Checks if the logged user is attending the given event.
|
void |
setResultEvents(List<es.uvigo.esei.dgss.teama.letta.entities.Event> resultEvents)
Sets the result of search.
|
void |
setSearchTerm(String searchTerm)
Sets the search term.
|
public List<String> autocomplete(String searchTerm)
searchTerm - the term searched. If the searchTerm is null, it will be
ignored.public String doSearch()
public List<es.uvigo.esei.dgss.teama.letta.entities.Event> getResultEvents()
public void setResultEvents(List<es.uvigo.esei.dgss.teama.letta.entities.Event> resultEvents)
resultEvents - the list of results.public String getSearchTerm()
public void setSearchTerm(String searchTerm)
searchTerm - the search term. If the searchTerm is null, it will be ignored
and the searchTerm will be the empty string.public void attendEvent(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws Exception
event - event to be attended by an userException - event is received as null value or just is attended by userpublic boolean isAttending(es.uvigo.esei.dgss.teama.letta.entities.Event event)
throws Exception
event - the event.Exception - if event is received as null valueCopyright © 2017. All rights reserved.