Interface RouteAPI

All Known Implementing Classes:
RouteRestController

public interface RouteAPI
  • Method Details

    • findAll

      org.springframework.http.ResponseEntity<@NonNull EnduranceTrioResponse<List<RouteDTO>>> findAll()
      Retrieves all route configurations.
      Returns:
      a ResponseEntity containing an EnduranceTrioResponse with a list of RouteDTO representing 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 ResponseEntity containing an EnduranceTrioResponse with the created RouteDTO
    • 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 update
      routeDTO - the route configuration with updated data
      Returns:
      a ResponseEntity containing an EnduranceTrioResponse with the updated RouteDTO
    • findById

      org.springframework.http.ResponseEntity<EnduranceTrioResponse<RouteDTO>> findById(@NonNull Long id)
      Finds a route configuration by its unique identifier.
      Parameters:
      id - the unique identifier of the route configuration
      Returns:
      a ResponseEntity containing an EnduranceTrioResponse with the corresponding RouteDTO
    • 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 ResponseEntity containing an EnduranceTrioResponse with the corresponding RouteMetricsDTO