@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 |
doAvancedSearch()
Searches events that match with terms and redirects to
search_results page.
|
String |
doSearch()
Searches events that match with searchTerm attribute and redirects to
search_results page.
|
es.uvigo.esei.dgss.teama.letta.entities.Category |
getCategory()
Returns the category.
|
String |
getCreator()
Returns the creator.
|
String |
getDescription()
Returns the description.
|
Date |
getEnd()
Returns the end date.
|
String |
getHead()
Returns the head.
|
String |
getLocation()
Returns the location.
|
String |
getOrganizer()
Returns the organizer.
|
String |
getProvince()
Returns the province.
|
List<es.uvigo.esei.dgss.teama.letta.entities.Event> |
getResultEvents()
Gets the result of search.
|
String |
getSearchTerm()
Gets the search term.
|
Date |
getStart()
Returns the start date.
|
String |
getTitle()
Returns the title.
|
boolean |
isAttending(es.uvigo.esei.dgss.teama.letta.entities.Event event)
Checks if the logged user is attending the given event.
|
void |
setCategory(es.uvigo.esei.dgss.teama.letta.entities.Category category)
Sets the category.
|
void |
setCreator(String creator)
Sets the creator.
|
void |
setDescription(String description)
Sets the description.
|
void |
setEnd(Date end)
Sets the end date.
|
void |
setHead(String head)
Sets the head
|
void |
setLocation(String location)
Sets the location.
|
void |
setOrganizer(String organizer)
Sets the organizer.
|
void |
setProvince(String province)
Sets the province.
|
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.
|
void |
setStart(Date start)
Sets the start date.
|
void |
setTitle(String title)
Sets the title
|
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 valuepublic String getCreator()
public void setCreator(String creator)
creator - public String getOrganizer()
public void setOrganizer(String organizer)
organizer - public String getTitle()
public void setTitle(String title)
title - public String getHead()
public void setHead(String head)
head - public String getDescription()
public void setDescription(String description)
description - public es.uvigo.esei.dgss.teama.letta.entities.Category getCategory()
public void setCategory(es.uvigo.esei.dgss.teama.letta.entities.Category category)
category - public String getLocation()
public void setLocation(String location)
location - public String getProvince()
public void setProvince(String province)
province - public Date getStart()
public void setStart(Date start)
start - public Date getEnd()
public void setEnd(Date end)
end - public String doAvancedSearch()
Copyright © 2017. All rights reserved.