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, InsightService insightService, RaceService raceService) -
Method Summary
Modifier and TypeMethodDescriptiongetEventInsights(String language, int year, Long id, int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the event-scoped insights page with related articles.getEventOverview(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.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.getRaceResults(String language, int year, Long eventId, Long raceId, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the race results page for the given event and race.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, InsightService insightService, RaceService raceService)
-
-
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
-
getEventInsights
@GetMapping("/{language:en|pt}/events/{year}/{id}/insights") public String getEventInsights(@PathVariable String language, @PathVariable int year, @PathVariable Long id, @RequestParam(defaultValue="0") int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the event-scoped insights page with related articles.- Parameters:
language- the language path variable (enorpt)year- the event yearid- the event IDpage- 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 event insights 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
-
getRaceResults
@GetMapping("/{language:en|pt}/events/{year}/{eventId}/results/{raceId}") public String getRaceResults(@PathVariable String language, @PathVariable int year, @PathVariable Long eventId, @PathVariable Long raceId, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the race results page for the given event and race.- Parameters:
language- the language path variable (enorpt)year- the event yeareventId- the event IDraceId- the race IDrequest- the current HTTP request for building page metadatamodel- the model to populate with view attributes- Returns:
- the race results view name
-