Package org.openwms.common.location
Class LocationGroupController
java.lang.Object
org.openwms.core.http.AbstractWebController
org.openwms.common.location.LocationGroupController
@Profile("!INMEM")
@Validated
@RefreshScope
@MeasuredRestController
public class LocationGroupController
extends org.openwms.core.http.AbstractWebController
A LocationGroupController.
- Author:
- Heiko Scherrer
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ErrorCodeTransformers.GroupStateIn
private final ErrorCodeTransformers.GroupStateOut
private final LocationGroupService
private final LocationGroupMapper
static final String
private final org.ameba.i18n.Translator
-
Constructor Summary
ConstructorDescriptionLocationGroupController
(org.ameba.i18n.Translator translator, LocationGroupService locationGroupService, LocationGroupMapper mapper, ErrorCodeTransformers.GroupStateIn groupStateIn, ErrorCodeTransformers.GroupStateOut groupStateOut) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<Void> changeGroupState
(String name, String op, ErrorCodeVO errorCode) org.springframework.http.ResponseEntity
<Void> changeGroupState
(String pKey, String op, LocationGroupState stateIn, LocationGroupState stateOut) org.springframework.http.ResponseEntity
<LocationGroupVO> create
(@Valid LocationGroupVO vo, jakarta.servlet.http.HttpServletRequest req) Creates a new location group.org.springframework.http.ResponseEntity
<Void> deleteLocationGroup
(String pKey) findAll()
findByName
(String name) findByNames
(List<String> names) org.springframework.http.ResponseEntity
<org.openwms.core.http.Index> index()
org.springframework.http.ResponseEntity
<Void> modifyLocationGroup
(String pKey, LocationGroupVO locationGroupVO) 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
-
PARENT
- See Also:
-
translator
private final org.ameba.i18n.Translator translator -
locationGroupService
-
mapper
-
groupStateIn
-
groupStateOut
-
-
Constructor Details
-
LocationGroupController
LocationGroupController(org.ameba.i18n.Translator translator, LocationGroupService locationGroupService, LocationGroupMapper mapper, ErrorCodeTransformers.GroupStateIn groupStateIn, ErrorCodeTransformers.GroupStateOut groupStateOut)
-
-
Method Details
-
create
@PostMapping("/v1/location-groups") public org.springframework.http.ResponseEntity<LocationGroupVO> create(@Validated(Create.class) @Valid @RequestBody @Valid LocationGroupVO vo, jakarta.servlet.http.HttpServletRequest req) Creates a new location group.- Parameters:
vo
- The LocationGroupVO object containing the data for the new location group. The object must be validated using the annotated constraints specified in the ValidationGroups.Create interface.- Returns:
- A ResponseEntity object containing the LocationGroupVO of the newly created location group, or an empty ResponseEntity if the creation failed.
-
findByName
@Transactional(readOnly=true) @GetMapping(value="/v1/location-groups", params="name") public LocationGroupVO findByName(@RequestParam("name") String name) -
findByNames
@Transactional(readOnly=true) @GetMapping(value="/v1/location-groups", params="names") public List<LocationGroupVO> findByNames(@RequestParam("names") List<String> names) -
findAll
@Transactional(readOnly=true) @GetMapping("/v1/location-groups") public List<LocationGroupVO> findAll() -
changeGroupState
@PatchMapping(value="/v1/location-groups", params={"name","op=change-state"}) public org.springframework.http.ResponseEntity<Void> changeGroupState(@RequestParam(name="name") String name, @RequestParam(name="op") String op, @RequestBody ErrorCodeVO errorCode) -
changeGroupState
@PatchMapping(value="/v1/location-group/{pKey}", params="op=change-state") public org.springframework.http.ResponseEntity<Void> changeGroupState(@PathVariable String pKey, @RequestParam(name="op") String op, @RequestParam(name="statein") LocationGroupState stateIn, @RequestParam(name="stateout") LocationGroupState stateOut) -
deleteLocationGroup
-
modifyLocationGroup
@PatchMapping("/v1/location-groups/{pKey}") public org.springframework.http.ResponseEntity<Void> modifyLocationGroup(@PathVariable String pKey, @RequestBody LocationGroupVO locationGroupVO) -
index
@GetMapping("/v1/location-groups/index") public org.springframework.http.ResponseEntity<org.openwms.core.http.Index> index()
-