Package org.openwms.common.location
Class WorkflowApi
java.lang.Object
org.openwms.core.http.AbstractWebController
org.openwms.common.location.WorkflowApi
@Profile("!INMEM")
@Validated
@MeasuredRestController
public class WorkflowApi
extends org.openwms.core.http.AbstractWebController
A WorkflowApi.
- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LocationService
private final LocationMapper
private final org.ameba.i18n.Translator
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowApi
(LocationService locationService, LocationMapper mapper, org.ameba.i18n.Translator translator) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
addSelfLink
(LocationVO result) org.springframework.http.ResponseEntity
<Optional<LocationVO>> createLocation
(@Valid LocationVO location, jakarta.servlet.http.HttpServletRequest req) org.springframework.http.ResponseEntity
<Optional<LocationVO>> findByErpCodeOpt
(String erpCode) org.springframework.http.ResponseEntity
<Optional<LocationVO>> findByIdOpt
(String locationId) org.springframework.http.ResponseEntity
<Optional<LocationVO>> findByPKeyOpt
(String pKey) org.springframework.http.ResponseEntity
<Optional<LocationVO>> findByPlcCodeOpt
(String plcCode) org.springframework.http.ResponseEntity
<Optional<LocationVO>> updateLocation
(@Valid LocationVO location) 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
-
mapper
-
translator
private final org.ameba.i18n.Translator translator -
locationService
-
-
Constructor Details
-
WorkflowApi
WorkflowApi(LocationService locationService, LocationMapper mapper, org.ameba.i18n.Translator translator)
-
-
Method Details
-
createLocation
@PostMapping(value="/v1/locations", produces="application/vnd.openwms.common.location-opt-v1+json") @Validated(Create.class) public org.springframework.http.ResponseEntity<Optional<LocationVO>> createLocation(@Valid @RequestBody @Valid LocationVO location, jakarta.servlet.http.HttpServletRequest req) -
updateLocation
@PutMapping(value="/v1/locations", produces="application/vnd.openwms.common.location-opt-v1+json") @Validated(Update.class) public org.springframework.http.ResponseEntity<Optional<LocationVO>> updateLocation(@Valid @RequestBody @Valid LocationVO location) -
findByPKeyOpt
@GetMapping(value="/v1/locations/{pKey}", produces="application/vnd.openwms.common.location-opt-v1+json") public org.springframework.http.ResponseEntity<Optional<LocationVO>> findByPKeyOpt(@PathVariable("pKey") String pKey) -
addSelfLink
-
findByIdOpt
@GetMapping(value="/v1/locations", params="locationId", produces="application/vnd.openwms.common.location-opt-v1+json") public org.springframework.http.ResponseEntity<Optional<LocationVO>> findByIdOpt(@RequestParam("locationId") String locationId) -
findByErpCodeOpt
@GetMapping(value="/v1/locations", params="erpCode", produces="application/vnd.openwms.common.location-opt-v1+json") public org.springframework.http.ResponseEntity<Optional<LocationVO>> findByErpCodeOpt(@RequestParam("erpCode") String erpCode) -
findByPlcCodeOpt
@GetMapping(value="/v1/locations", params="plcCode", produces="application/vnd.openwms.common.location-opt-v1+json") public org.springframework.http.ResponseEntity<Optional<LocationVO>> findByPlcCodeOpt(@RequestParam("plcCode") String plcCode)
-