Class AthleteWebController
java.lang.Object
com.endurancetrio.app.competitor.web.AthleteWebController
The
AthleteWebController handles Thymeleaf views for the athletes section.-
Constructor Summary
ConstructorsConstructorDescriptionAthleteWebController(MessageService messageService, AppProperties appProperties, AthleteService athleteService) -
Method Summary
Modifier and TypeMethodDescriptiongetAthleteById(String language, Long id, int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the athlete profile page for a specific athlete, including their races.getAthletes(String language, int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the athletes listing page with paginated athletes ordered by known name.
-
Constructor Details
-
AthleteWebController
@Autowired public AthleteWebController(MessageService messageService, AppProperties appProperties, AthleteService athleteService)
-
-
Method Details
-
getAthletes
@GetMapping("/{language:en|pt}/athletes") public String getAthletes(@PathVariable String language, @RequestParam(defaultValue="0") int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the athletes listing page with paginated athletes ordered by known name.- Parameters:
language- the language path variable (enorpt)page- 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 athletes view name
-
getAthleteById
@GetMapping("/{language:en|pt}/athletes/{id}") public String getAthleteById(@PathVariable String language, @PathVariable Long id, @RequestParam(defaultValue="0") int page, jakarta.servlet.http.HttpServletRequest request, org.springframework.ui.Model model) Returns the athlete profile page for a specific athlete, including their races.- Parameters:
language- the language path variable (enorpt)id- the ID of the athletepage- 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 athlete profile view name
-