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 TypeMethodDescriptionvoid
addErrorToTransportUnit
(String transportUnitBK, String errorCode) Add an error message to aTransportUnit
.void
blockTransportUnit
(String transportUnitBK) Set the state of aTransportUnit
to BLOCKED.void
Create aTransportUnit
with the given (minimal) information.void
createTU
(String transportUnitBK, TransportUnitVO tu, Boolean strict) Create aTransportUnit
with the given business key (Barcode).findTransportUnit
(String transportUnitBK) Find and return aTransportUnit
identified by its business key (Barcode).findTransportUnits
(List<String> transportUnitBKs) Find and return allTransportUnit
identified by their business keys (Barcodes).findTransportUnitsOn
(String actualLocation) Find and return allTransportUnit
s that are booked on the given Location.Move aTransportUnit
from its current location to thenewLocation
.void
qcTransportUnit
(String transportUnitBK) Set the state of aTransportUnit
to QUALITY_CHECK.void
unblockTransportUnit
(String transportUnitBK) Set the state of aTransportUnit
to 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 aTransportUnit
identified 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 allTransportUnit
identified 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 allTransportUnit
s 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 aTransportUnit
with the given business key (Barcode).- Parameters:
transportUnitBK
- The unique (physical) identifiertu
- Detailed information of theTransportUnit
to createstrict
- If theTransportUnit
already exists and this istrue
an 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 aTransportUnit
with the given (minimal) information.- Parameters:
transportUnitBK
- The unique (physical) identifieractualLocation
- The current location of theTransportUnit
tut
- The type (TransportUnitType
strict
- If theTransportUnit
already exists and this istrue
an 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 theTransportUnit
to 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 aTransportUnit
from its current location to thenewLocation
.- Parameters:
transportUnitBK
- The unique (physical) identifiernewLocation
- The newLocation
to 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 aTransportUnit
to 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 aTransportUnit
to 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 aTransportUnit
to QUALITY_CHECK.- Parameters:
transportUnitBK
- The unique (physical) identifier
-