Package com.endurancetrio.app.event.web
Class EventWebController
java.lang.Object
com.endurancetrio.app.event.web.EventWebController
The
EventWebController handles Thymeleaf views for the events section.-
Constructor Summary
ConstructorsConstructorDescriptionEventWebController(MessageService messageService, AppProperties appProperties, EventService eventService) -
Method Summary
Modifier and TypeMethodDescriptiongetEventOverview(String language, int year, Long id, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the event overview page for the given event.getEventResults(String language, int year, Long id, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the event results page for the given event.getEventsByYear(String language, int year, int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the events-by-year listing page with paginated events for the given year.getYearsWithEvents(String language, int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the years-with-events listing page with batched year groups.
-
Constructor Details
-
EventWebController
@Autowired public EventWebController(MessageService messageService, AppProperties appProperties, EventService eventService)
-
-
Method Details
-
getYearsWithEvents
@GetMapping("/{language:en|pt}/events") public String getYearsWithEvents(@PathVariable String language, @RequestParam(defaultValue="0") int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the years-with-events listing page with batched year groups.- Parameters:
language- the language path variable (enorpt)page- the page number from the query string (default0)request- the current HTTP request for building page metadatamodel- the model to populate with view attributes- Returns:
- the years-with-events view name
-
getEventsByYear
@GetMapping("/{language:en|pt}/events/{year}") public String getEventsByYear(@PathVariable String language, @PathVariable int year, @RequestParam(defaultValue="0") int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the events-by-year listing page with paginated events for the given year.- Parameters:
language- the language path variable (enorpt)year- the year to filter events bypage- the page number from the query string (default0, clamped to non-negative)request- the current HTTP request for building page metadatamodel- the model to populate with view attributes- Returns:
- the events-by-year view name
-
getEventOverview
@GetMapping("/{language:en|pt}/events/{year}/{id}/overview") public String getEventOverview(@PathVariable String language, @PathVariable int year, @PathVariable Long id, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the event overview page for the given event.- Parameters:
language- the language path variable (enorpt)year- the event yearid- the event IDrequest- the current HTTP request for building page metadatamodel- the model to populate with view attributes- Returns:
- the event overview view name
-
getEventResults
@GetMapping("/{language:en|pt}/events/{year}/{id}/results") public String getEventResults(@PathVariable String language, @PathVariable int year, @PathVariable Long id, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the event results page for the given event.- Parameters:
language- the language path variable (enorpt)year- the event yearid- the event IDrequest- the current HTTP request for building page metadatamodel- the model to populate with view attributes- Returns:
- the event results view name
-