Interface TransportOrderApi

All Known Implementing Classes:
TransportationFacade

@FeignClient(name="tms-service", dismiss404=true, qualifiers="transportOrderApi") public interface TransportOrderApi
A TransportOrderApi is a part of the Transportation Service' public RESTful API.
Author:
Heiko Scherrer
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    changeState(String pKey, String state)
    Request to change the state of an existing TransportOrder.
    void
    createTO(String barcode, String target)
    Create a TransportOrder for a TransportUnit identified by the given barcode to the given target.
    void
    createTO(String barcode, String target, String priority)
    Create a TransportOrder for a TransportUnit identified by the given barcode to the given target and the given priority.
    findBy(String barcode, String state)
    Find and return all TransportOrders in a particular state for the TransportUnit with the given barcode.
    Find and return a TransportOrder identified by its persistent key.
    void
    updateTO(String pKey, UpdateTransportOrderVO transportOrder)
    Request to update an existing TransportOrder.
  • Method Details

    • findBy

      @GetMapping(value="/v1/transport-orders", params={"barcode","state"}) List<TransportOrderVO> findBy(@RequestParam("barcode") String barcode, @RequestParam("state") String state)
      Find and return all TransportOrders in a particular state for the TransportUnit with the given barcode.
      Parameters:
      barcode - The business identifier of the TransportUnit
      state - The TransportOrder state
      Returns:
      A List implementation of the result instances, never null
    • findByPKey

      @GetMapping("/v1/transport-orders/{pKey}") TransportOrderVO findByPKey(@PathVariable("pKey") String pKey)
      Find and return a TransportOrder identified by its persistent key.
      Parameters:
      pKey - The persistent key of the TransportOrder (not the primary key)
      Returns:
      The instance
      Throws:
      org.ameba.exception.NotFoundException - if no TransportOrder with that id exists
    • createTO

      @PostMapping(value="/v1/transport-orders", params={"barcode","target"}) @ResponseStatus(CREATED) void createTO(@RequestParam("barcode") String barcode, @RequestParam("target") String target)
      Create a TransportOrder for a TransportUnit identified by the given barcode to the given target.
      Parameters:
      barcode - The business identifier of the TransportUnit
      target - Either a Location of a LocationGroup
    • createTO

      @PostMapping(value="/v1/transport-orders", params={"barcode","target"}) @ResponseStatus(CREATED) void createTO(@RequestParam("barcode") String barcode, @RequestParam("target") String target, @RequestParam(value="priority",required=false) String priority)
      Create a TransportOrder for a TransportUnit identified by the given barcode to the given target and the given priority.
      Parameters:
      barcode - The business identifier of the TransportUnit
      target - Either a Location of a LocationGroup
      priority - The priority of the TransportOrder
    • changeState

      @PostMapping(value="/v1/transport-orders/{pKey}", params="state") void changeState(@PathVariable("pKey") String pKey, @RequestParam("state") String state)
      Request to change the state of an existing TransportOrder.
      Parameters:
      pKey - The persistent key of the TransportOrder (not the primary key)
      state - The requested TransportOrder state
    • updateTO

      @PatchMapping("/v1/transport-orders/{pKey}") @ResponseStatus(NO_CONTENT) void updateTO(@PathVariable("pKey") String pKey, @RequestBody UpdateTransportOrderVO transportOrder)
      Request to update an existing TransportOrder.
      Parameters:
      pKey - The persistent key of the TransportOrder (not the primary key)
      transportOrder - The minimal necessary structure of the change set