Package org.openwms.common.transport.api
Interface TransportUnitApi
@FeignClient(name="common-service",
qualifiers="transportUnitApi")
public interface TransportUnitApi
A TransportUnitApi is the public REST API to manage
TransportUnits. It is implemented by a Feign client stub.- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddErrorToTransportUnit(String transportUnitBK, String errorCode) Add an error message to aTransportUnit.voidblockTransportUnit(String transportUnitBK) Set the state of aTransportUnitto BLOCKED.voidCreate aTransportUnitwith the given (minimal) information.voidcreateTU(String transportUnitBK, TransportUnitVO tu, Boolean strict) Create aTransportUnitwith the given business key (Barcode).findTransportUnit(String transportUnitBK) Find and return aTransportUnitidentified by its business key (Barcode).findTransportUnits(List<String> transportUnitBKs) Find and return allTransportUnitidentified by their business keys (Barcodes).findTransportUnitsOn(String actualLocation) Find and return allTransportUnits that are booked on the given Location.Move aTransportUnitfrom its current location to thenewLocation.voidqcTransportUnit(String transportUnitBK) Set the state of aTransportUnitto QUALITY_CHECK.voidunblockTransportUnit(String transportUnitBK) Set the state of aTransportUnitto AVAILABLE.updateTU(String transportUnitBK, TransportUnitVO tu) Update an existingTransportUnit.
-
Method Details
-
findTransportUnit
@GetMapping(value="/v1/transport-units", params="bk", produces="application/vnd.openwms.transport-unit-v1+json") TransportUnitVO findTransportUnit(@RequestParam("bk") String transportUnitBK) Find and return aTransportUnitidentified by its business key (Barcode).- Parameters:
transportUnitBK- The unique (physical) identifier- Returns:
- The instance or the implementation may return a 404-Not Found
-
findTransportUnits
@GetMapping(value="/v1/transport-units", params="bks", produces="application/vnd.openwms.transport-unit-v1+json") List<TransportUnitVO> findTransportUnits(@RequestParam("bks") List<String> transportUnitBKs) Find and return allTransportUnitidentified by their business keys (Barcodes).- Parameters:
transportUnitBKs- The unique (physical) identifiers- Returns:
- All TransportUnits or an empty List never null
-
findTransportUnitsOn
@GetMapping(value="/v1/transport-units", params="actualLocation", produces="application/vnd.openwms.transport-unit-v1+json") List<TransportUnitVO> findTransportUnitsOn(@RequestParam("actualLocation") String actualLocation) Find and return allTransportUnits that are booked on the given Location.- Parameters:
actualLocation- The Location to search for TransportUnits- Returns:
- All TransportUnits on that Location or an empty List never null
-
createTU
@PostMapping(value="/v1/transport-units", params="bk") void createTU(@RequestParam("bk") String transportUnitBK, @RequestBody TransportUnitVO tu, @RequestParam(value="strict",required=false) Boolean strict) Create aTransportUnitwith the given business key (Barcode).- Parameters:
transportUnitBK- The unique (physical) identifiertu- Detailed information of theTransportUnitto createstrict- If theTransportUnitalready exists and this istruean error is thrown. Iffalse, the implementation exists silently (default)
-
createTU
@PostMapping(value="/v1/transport-units", params={"bk","actualLocation","tut"}) void createTU(@RequestParam("bk") String transportUnitBK, @RequestParam("actualLocation") String actualLocation, @RequestParam("tut") String tut, @RequestParam(value="strict",required=false) Boolean strict) Create aTransportUnitwith the given (minimal) information.- Parameters:
transportUnitBK- The unique (physical) identifieractualLocation- The current location of theTransportUnittut- The type (TransportUnitTypestrict- If theTransportUnitalready exists and this istruean error is thrown. Iffalse, the implementation exists silently (default)
-
updateTU
@PutMapping(value="/v1/transport-units", params="bk") TransportUnitVO updateTU(@RequestParam("bk") String transportUnitBK, @RequestBody TransportUnitVO tu) Update an existingTransportUnit.- Parameters:
transportUnitBK- The unique (physical) identifiertu- Detailed structure of theTransportUnitto create- Returns:
- The updated instance
-
moveTU
@PatchMapping(value="/v1/transport-units", params={"bk","newLocation"}) TransportUnitVO moveTU(@RequestParam("bk") String transportUnitBK, @RequestParam("newLocation") String newLocation) Move aTransportUnitfrom its current location to thenewLocation.- Parameters:
transportUnitBK- The unique (physical) identifiernewLocation- The newLocationto move to- Returns:
- The updated instance
-
addErrorToTransportUnit
@PostMapping(value="/v1/transport-unit/error", params={"bk","errorCode"}) void addErrorToTransportUnit(@RequestParam("bk") String transportUnitBK, @RequestParam("errorCode") String errorCode) Add an error message to aTransportUnit.- Parameters:
transportUnitBK- The unique (physical) identifiererrorCode- The message to store with the TransportUnit
-
blockTransportUnit
@PostMapping(value="/v1/transport-units/block", params="bk") void blockTransportUnit(@RequestParam("bk") String transportUnitBK) Set the state of aTransportUnitto BLOCKED.- Parameters:
transportUnitBK- The unique (physical) identifier
-
unblockTransportUnit
@PostMapping(value="/v1/transport-units/available", params="bk") void unblockTransportUnit(@RequestParam("bk") String transportUnitBK) Set the state of aTransportUnitto AVAILABLE.- Parameters:
transportUnitBK- The unique (physical) identifier
-
qcTransportUnit
@PostMapping(value="/v1/transport-units/quality-check", params="bk") void qcTransportUnit(@RequestParam("bk") String transportUnitBK) Set the state of aTransportUnitto QUALITY_CHECK.- Parameters:
transportUnitBK- The unique (physical) identifier
-