Package org.openwms.tms.api
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 TypeMethodDescriptionvoidchangeState(String pKey, String state) Request to change the state of an existingTransportOrder.voidCreate aTransportOrderfor aTransportUnitidentified by the givenbarcodeto the giventarget.voidCreate aTransportOrderfor aTransportUnitidentified by the givenbarcodeto the giventargetand the givenpriority.Find and return allTransportOrders in a particularstatefor theTransportUnitwith the givenbarcode.findByPKey(String pKey) Find and return aTransportOrderidentified by its persistent key.voidupdateTO(String pKey, UpdateTransportOrderVO transportOrder) Request to update an existingTransportOrder.
-
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 allTransportOrders in a particularstatefor theTransportUnitwith the givenbarcode.- Parameters:
barcode- The business identifier of the TransportUnitstate- 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 aTransportOrderidentified 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 aTransportOrderfor aTransportUnitidentified by the givenbarcodeto the giventarget.- Parameters:
barcode- The business identifier of the TransportUnittarget- 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 aTransportOrderfor aTransportUnitidentified by the givenbarcodeto the giventargetand the givenpriority.- Parameters:
barcode- The business identifier of the TransportUnittarget- Either a Location of a LocationGrouppriority- 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 existingTransportOrder.- 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 existingTransportOrder.- Parameters:
pKey- The persistent key of the TransportOrder (not the primary key)transportOrder- The minimal necessary structure of the change set
-