Interface RouteAPI
- All Known Implementing Classes:
RouteRestController
public interface RouteAPI
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<@NonNull EnduranceTrioResponse<RouteDTO>> Creates a new route configuration.org.springframework.http.ResponseEntity<@NonNull EnduranceTrioResponse<List<RouteDTO>>> findAll()Retrieves all route configurations.org.springframework.http.ResponseEntity<EnduranceTrioResponse<RouteDTO>> Finds a route configuration by its unique identifier.org.springframework.http.ResponseEntity<EnduranceTrioResponse<RouteMetricsDTO>> getRouteMetrics(@NonNull Long id) Retrieves the GeoJSON CollectionFeature definition for a specific route.org.springframework.http.ResponseEntity<@NonNull EnduranceTrioResponse<RouteDTO>> Updates an existing route configuration.
-
Method Details
-
findAll
org.springframework.http.ResponseEntity<@NonNull EnduranceTrioResponse<List<RouteDTO>>> findAll()Retrieves all route configurations.- Returns:
- a
ResponseEntitycontaining anEnduranceTrioResponsewith a list ofRouteDTOrepresenting all route configurations
-
create
org.springframework.http.ResponseEntity<@NonNull EnduranceTrioResponse<RouteDTO>> create(RouteDTO routeDTO) Creates a new route configuration. The request body must not include an id — it is assigned by the server.- Parameters:
routeDTO- the route configuration to be created (id must be null)- Returns:
- a
ResponseEntitycontaining anEnduranceTrioResponsewith the createdRouteDTO
-
update
org.springframework.http.ResponseEntity<@NonNull EnduranceTrioResponse<RouteDTO>> update(@NonNull Long id, RouteDTO routeDTO) Updates an existing route configuration.- Parameters:
id- the unique identifier of the route configuration to updaterouteDTO- the route configuration with updated data- Returns:
- a
ResponseEntitycontaining anEnduranceTrioResponsewith the updatedRouteDTO
-
findById
Finds a route configuration by its unique identifier.- Parameters:
id- the unique identifier of the route configuration- Returns:
- a
ResponseEntitycontaining anEnduranceTrioResponsewith the correspondingRouteDTO
-
getRouteMetrics
org.springframework.http.ResponseEntity<EnduranceTrioResponse<RouteMetricsDTO>> getRouteMetrics(@NonNull Long id) Retrieves the GeoJSON CollectionFeature definition for a specific route.- Parameters:
id- The unique identifier of the route.- Returns:
- a
ResponseEntitycontaining anEnduranceTrioResponsewith the correspondingRouteMetricsDTO
-