Class VehicleAssignmentResource


  • @Path("/vehicle-assign")
    @RestController
    public class VehicleAssignmentResource
    extends AuthenticatedResource
    Endpoint for vehicle assignment services, such as manually associating a vehicle with a block, and managing that relationship life cycle.
    • Constructor Detail

      • VehicleAssignmentResource

        public VehicleAssignmentResource()
    • Method Detail

      • assign

        public boolean assign​(String blockId,
                              String vehicleId)
      • assignVehicleToBlock

        @Path("/assign/block/{block}/vehicle/{vehicle}")
        @GET
        public javax.ws.rs.core.Response assignVehicleToBlock​(@PathParam("block")
                                                              String block,
                                                              @PathParam("vehicle")
                                                              String vehicle)
      • getAssignmentByBlockId

        public String getAssignmentByBlockId​(String blockId)
      • getActiveBlocksAsCSV

        @Path("/active-blocks/{serviceDate}/{routeList}")
        @GET
        public javax.ws.rs.core.Response getActiveBlocksAsCSV​(@PathParam("serviceDate")
                                                              String serviceDate,
                                                              @PathParam("routeList")
                                                              String routes)
                                                       throws ExecutionException
        Throws:
        ExecutionException
      • getAssignmentsAsCSV

        @Path("/get/csv")
        @GET
        public javax.ws.rs.core.Response getAssignmentsAsCSV()
      • getAssignmentsAsJson

        @Path("/list")
        @GET
        @Produces("application/json")
        public javax.ws.rs.core.Response getAssignmentsAsJson()
                                                       throws IOException
        Throws:
        IOException
      • getActiveVehiclesAsJson

        @Path("/active-vehicles/list")
        @GET
        @Produces("application/json")
        public javax.ws.rs.core.Response getActiveVehiclesAsJson​(@QueryParam("q")
                                                                 String query)
                                                          throws IOException
        Throws:
        IOException