Package org.openwms.common.transport
Class TransportUnitController
java.lang.Object
org.openwms.core.http.AbstractWebController
org.openwms.common.transport.TransportUnitController
@Profile("!INMEM")
@Validated
@MeasuredRestController
public class TransportUnitController
extends org.openwms.core.http.AbstractWebController
A TransportUnitController.
- Author:
- Heiko Scherrer
-
Field Summary
Modifier and TypeFieldDescriptionprivate final BarcodeGenerator
private static final org.slf4j.Logger
private final TransportUnitMapper
private final TransportUnitService
private final org.ameba.i18n.Translator
-
Constructor Summary
ConstructorDescriptionTransportUnitController
(TransportUnitMapper mapper, org.ameba.i18n.Translator translator, BarcodeGenerator barcodeGenerator, TransportUnitService service) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<Void> addErrorToTransportUnit
(String transportUnitBK, String errorCode) private TransportUnitVO
addLinks
(TransportUnitVO result) org.springframework.http.ResponseEntity
<Void> blockTransportUnit
(@NotBlank String transportUnitBK) org.springframework.http.ResponseEntity
<Void> changeState
(@NotBlank String transportUnitBK, @NotBlank String newState) private List
<TransportUnitVO> convertAndLinks
(List<TransportUnit> entities) private TransportUnitVO
convertAndLinks
(TransportUnit entity) org.springframework.http.ResponseEntity
<TransportUnitVO> createTU
(String transportUnitBK, String actualLocation, String tut, Boolean strict, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity
<Void> createTU
(String transportUnitBK, TransportUnitVO tu, Boolean strict, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity
<Void> org.springframework.http.ResponseEntity
<List<TransportUnitVO>> findAll()
org.springframework.http.ResponseEntity
<TransportUnitVO> findTransportUnit
(String transportUnitBK) org.springframework.http.ResponseEntity
<TransportUnitVO> org.springframework.http.ResponseEntity
<List<TransportUnitVO>> findTransportUnits
(@NotEmpty List<String> barcodes) org.springframework.http.ResponseEntity
<List<TransportUnitVO>> findTransportUnitsOn
(String actualLocation) private org.springframework.http.ResponseEntity
<?> org.springframework.http.ResponseEntity
<org.openwms.core.http.Index> index()
org.springframework.http.ResponseEntity
<TransportUnitVO> org.springframework.http.ResponseEntity
<Void> qcTransportUnit
(@NotBlank String transportUnitBK) void
org.springframework.http.ResponseEntity
<Void> unblockTransportUnit
(@NotBlank String transportUnitBK) org.springframework.http.ResponseEntity
<TransportUnitVO> updateTU
(String transportUnitBK, @Valid TransportUnitVO tu) Methods inherited from class org.openwms.core.http.AbstractWebController
buildNOKResponse, buildNOKResponseWithKey, buildOKResponse, buildResponse, buildResponse, getLocationForCreatedResource, getLocationURIForCreatedResource, handleBehaviorAwareException, handleBusinessRuntimeException, handleConstraintViolationException, handleException, handleHttpBusinessException, handleRemovalNotAllowedException, handleTechnicalRuntimeException, handleValidationException, illegalArgumentException, translate
-
Field Details
-
EXC_LOGGER
private static final org.slf4j.Logger EXC_LOGGER -
mapper
-
translator
private final org.ameba.i18n.Translator translator -
barcodeGenerator
-
service
-
-
Constructor Details
-
TransportUnitController
TransportUnitController(TransportUnitMapper mapper, org.ameba.i18n.Translator translator, BarcodeGenerator barcodeGenerator, TransportUnitService service)
-
-
Method Details
-
handleStateChangeException
@ExceptionHandler(StateChangeException.class) private org.springframework.http.ResponseEntity<?> handleStateChangeException(StateChangeException e) -
findTransportUnitByPKey
@GetMapping(value="/v1/transport-units/{pKey}", produces="application/vnd.openwms.transport-unit-v1+json") public org.springframework.http.ResponseEntity<TransportUnitVO> findTransportUnitByPKey(@PathVariable("pKey") String pKey) -
findTransportUnit
@GetMapping(value="/v1/transport-units", params="bk", produces="application/vnd.openwms.transport-unit-v1+json") public org.springframework.http.ResponseEntity<TransportUnitVO> findTransportUnit(@RequestParam("bk") String transportUnitBK) -
findAll
@GetMapping(value="/v1/transport-units", produces="application/vnd.openwms.transport-unit-v1+json") public org.springframework.http.ResponseEntity<List<TransportUnitVO>> findAll() -
findTransportUnits
@GetMapping(value="/v1/transport-units", params="bks", produces="application/vnd.openwms.transport-unit-v1+json") public org.springframework.http.ResponseEntity<List<TransportUnitVO>> findTransportUnits(@RequestParam("bks") @NotEmpty @NotEmpty List<String> barcodes) -
findTransportUnitsOn
@GetMapping(value="/v1/transport-units", params="actualLocation", produces="application/vnd.openwms.transport-unit-v1+json") public org.springframework.http.ResponseEntity<List<TransportUnitVO>> findTransportUnitsOn(@RequestParam("actualLocation") String actualLocation) -
createTU
@PostMapping(value="/v1/transport-units", params="bk") public org.springframework.http.ResponseEntity<Void> createTU(@RequestParam("bk") String transportUnitBK, @Validated(Create.class) @RequestBody TransportUnitVO tu, @RequestParam(value="strict",required=false) Boolean strict, jakarta.servlet.http.HttpServletRequest req) -
synchronizeTU
@PostMapping("/v1/transport-units/synchronize") public void synchronizeTU() -
deleteTU
-
createTU
@PostMapping(value="/v1/transport-units", params={"actualLocation","tut"}, produces="application/vnd.openwms.transport-unit-v1+json") public org.springframework.http.ResponseEntity<TransportUnitVO> createTU(@RequestParam(value="bk",required=false) String transportUnitBK, @RequestParam("actualLocation") String actualLocation, @RequestParam("tut") String tut, @RequestParam(value="strict",required=false) Boolean strict, jakarta.servlet.http.HttpServletRequest req) -
updateTU
@Validated(Update.class) @PutMapping(value="/v1/transport-units", params="bk", produces="application/vnd.openwms.transport-unit-v1+json") public org.springframework.http.ResponseEntity<TransportUnitVO> updateTU(@RequestParam("bk") String transportUnitBK, @Valid @RequestBody @Valid TransportUnitVO tu) -
moveTU
@PatchMapping(value="/v1/transport-units", params={"bk","newLocation"}, produces="application/vnd.openwms.transport-unit-v1+json") public org.springframework.http.ResponseEntity<TransportUnitVO> moveTU(@RequestParam("bk") String transportUnitBK, @RequestParam("newLocation") String newLocation) -
addErrorToTransportUnit
-
index
@GetMapping("/v1/transport-units/index") public org.springframework.http.ResponseEntity<org.openwms.core.http.Index> index() -
blockTransportUnit
-
unblockTransportUnit
-
qcTransportUnit
-
changeState
-
addLinks
-
convertAndLinks
-
convertAndLinks
-