Package org.openwms.wms.transport
Class TransportUnitController
java.lang.Object
org.openwms.core.http.AbstractWebController
org.openwms.wms.transport.TransportUnitController
@Validated
@MeasuredRestController
public class TransportUnitController
extends org.openwms.core.http.AbstractWebController
A TransportUnitController.
- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.ameba.mapping.BeanMapper
private final TransportUnitService
private final org.ameba.i18n.Translator
private final TransportUnitMapper
-
Constructor Summary
ConstructorsConstructorDescriptionTransportUnitController
(org.ameba.i18n.Translator translator, TransportUnitService service, TransportUnitMapper transportUnitMapper, org.ameba.mapping.BeanMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<Object> createTU
(String transportUnitBK, String actualErpCode, String tut, String loadUnitType, int parts, String customerOrderId, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity
<Void> createTU
(@Valid TransportUnitVO tu, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity
<TransportUnitVO> findByPKey
(String pKey) org.springframework.http.ResponseEntity
<TransportUnitVO> findTransportUnit
(String transportUnitBK) org.springframework.http.ResponseEntity
<TransportUnitVO> 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
-
translator
private final org.ameba.i18n.Translator translator -
service
-
transportUnitMapper
-
mapper
private final org.ameba.mapping.BeanMapper mapper
-
-
Constructor Details
-
TransportUnitController
TransportUnitController(org.ameba.i18n.Translator translator, TransportUnitService service, TransportUnitMapper transportUnitMapper, org.ameba.mapping.BeanMapper mapper)
-
-
Method Details
-
findByPKey
@GetMapping(value="/v1/transport-units/{pKey}", produces="application/vnd.openwms.wms.transport-unit-v1+json") public org.springframework.http.ResponseEntity<TransportUnitVO> findByPKey(@PathVariable("pKey") String pKey) -
findTransportUnit
@GetMapping(value="/v1/transport-units", params="bk", produces="application/vnd.openwms.wms.transport-unit-v1+json") public org.springframework.http.ResponseEntity<TransportUnitVO> findTransportUnit(@RequestParam("bk") String transportUnitBK) -
createTU
@Validated(CreateTransportUnit.class) @PostMapping("/v1/transport-units") public org.springframework.http.ResponseEntity<Void> createTU(@Valid @RequestBody @Valid TransportUnitVO tu, jakarta.servlet.http.HttpServletRequest req) throws URISyntaxException - Throws:
URISyntaxException
-
createTU
@PostMapping(value="/v1/transport-units", params={"actualErpCode","tut"}) public org.springframework.http.ResponseEntity<Object> createTU(@RequestParam(value="bk",required=false) String transportUnitBK, @RequestParam("actualErpCode") String actualErpCode, @RequestParam("tut") String tut, @RequestParam(value="loadUnitType",required=false) String loadUnitType, @RequestParam(value="parts",required=false,defaultValue="0") int parts, @RequestParam(value="customerOrderId",required=false) String customerOrderId, jakarta.servlet.http.HttpServletRequest req) -
moveTU
@PatchMapping(value="/v1/transport-units", params={"bk","newLocation"}) public org.springframework.http.ResponseEntity<TransportUnitVO> moveTU(@RequestParam("bk") String transportUnitBK, @RequestParam("newLocation") String newLocation)
-