Package org.openwms.common.location.api
Interface LocationGroupApi
@FeignClient(name="common-service",
dismiss404=true,
qualifiers="locationGroupApi")
public interface LocationGroupApi
A LocationGroupApi.
- Author:
- Heiko Scherrer
-
Method Summary
Modifier and TypeMethodDescriptionvoidchangeGroupState(String name, String op, ErrorCodeVO errorCode) Change the state of an existingLocationGroup.voidchangeGroupState(String pKey, String op, LocationGroupState stateIn, LocationGroupState stateOut) Change the state of an existingLocationGroup.findAll()Find and return all existingLocationGroups.findByName(String name) Find aLocationGroupwith the givenname.findByNames(List<String> names) Find allLocationGroups with the givennames.
-
Method Details
-
findByName
@GetMapping(value="/v1/location-groups", params="name") @Cacheable("locationGroups") Optional<LocationGroupVO> findByName(@RequestParam("name") String name) Find aLocationGroupwith the givenname.- Parameters:
name- The name of the LocationGroup- Returns:
- The instance or may result in a 404-Not Found
-
findByNames
@GetMapping(value="/v1/location-groups", params="names") @Cacheable("locationGroups") List<LocationGroupVO> findByNames(@RequestParam("names") List<String> names) Find allLocationGroups with the givennames.- Parameters:
names- Names of all LocationGroups- Returns:
- A list of instances or an empty list but never null
-
findAll
Find and return all existingLocationGroups.- Returns:
- Never null
-
changeGroupState
@PatchMapping(value="/v1/location-groups", params={"name","op=change-state"}) void changeGroupState(@RequestParam(name="name") String name, @RequestParam(name="op") String op, @RequestBody ErrorCodeVO errorCode) Change the state of an existingLocationGroup.- Parameters:
name- The name of the LocationGrouperrorCode- The decoded state
-
changeGroupState
@PatchMapping(value="/v1/location-group/{pKey}", params="op=change-state") void changeGroupState(@PathVariable("pKey") String pKey, @RequestParam(name="op") String op, @RequestParam(name="statein",required=false) LocationGroupState stateIn, @RequestParam(name="stateout",required=false) LocationGroupState stateOut) Change the state of an existingLocationGroup.- Parameters:
pKey- The persistent key of the LocationGroupstateIn- The inbound state to setstateOut- The outbound state to set
-