Class LocationController

java.lang.Object
org.openwms.core.http.AbstractWebController
org.openwms.common.location.LocationController

@Profile("!INMEM") @Validated @MeasuredRestController public class LocationController extends org.openwms.core.http.AbstractWebController
A LocationController.
Author:
Heiko Scherrer
  • Field Details

    • mapper

      private final LocationMapper mapper
    • translator

      private final org.ameba.i18n.Translator translator
    • locationService

      private final LocationService locationService
    • locationRemovalManager

      private final LocationRemovalManager locationRemovalManager
  • Constructor Details

  • Method Details

    • createLocation

      @PostMapping("/v1/locations") @Validated(Create.class) public org.springframework.http.ResponseEntity<LocationVO> createLocation(@Valid @RequestBody @Valid LocationVO location, jakarta.servlet.http.HttpServletRequest req)
    • updateLocation

      @PutMapping("/v1/locations") @Validated(Update.class) public org.springframework.http.ResponseEntity<LocationVO> updateLocation(@Valid @RequestBody @Valid LocationVO location)
    • deleteLocation

      @DeleteMapping("/v1/locations/{pKey}") public org.springframework.http.ResponseEntity<Void> deleteLocation(@PathVariable("pKey") String pKey)
    • findByPKey

      @GetMapping("/v1/locations/{pKey}") public org.springframework.http.ResponseEntity<LocationVO> findByPKey(@PathVariable("pKey") String pKey)
    • addSelfLink

      private void addSelfLink(LocationVO result)
    • findByCoordinate

      @GetMapping(value="/v1/locations", params="locationId") public org.springframework.http.ResponseEntity<LocationVO> findByCoordinate(@RequestParam("locationId") String locationId)
    • findByErpCode

      @GetMapping(value="/v1/locations", params="erpCode") public org.springframework.http.ResponseEntity<LocationVO> findByErpCode(@RequestParam("erpCode") String erpCode)
    • findByPlcCode

      @GetMapping(value="/v1/locations", params="plcCode") public org.springframework.http.ResponseEntity<LocationVO> findByPlcCode(@RequestParam("plcCode") String plcCode)
    • findForLocationGroups

      @GetMapping(value="/v1/locations", params="locationGroupNames") public org.springframework.http.ResponseEntity<List<LocationVO>> findForLocationGroups(@RequestParam("locationGroupNames") List<String> locationGroupNames)
    • changeState

      @PatchMapping(value="/v1/location/{pKey}", params="op=change-state") public org.springframework.http.ResponseEntity<Void> changeState(@PathVariable(name="pKey") String pKey, @RequestParam(name="op") String op, @RequestBody ErrorCodeVO errorCode)
    • changeState

      @PatchMapping(value="/v1/location", params={"locationId","op=change-state"}) public org.springframework.http.ResponseEntity<Void> changeState(@RequestParam(name="locationId") String locationId, @RequestBody ErrorCodeVO errorCode)
    • changeState

      @PostMapping(path="/v1/locations", params={"erpCode","type!=PERMANENT_LOCK","mode"}) public org.springframework.http.ResponseEntity<Void> changeState(@RequestParam("erpCode") String erpCode, @RequestParam("type") LockType type, @RequestParam("mode") LockMode mode, @RequestParam(value="plcState",required=false) Integer plcState)
      Change the current mode a Location, identified by erpCode.
      Parameters:
      erpCode - The ERP code of the Location
      type - The type of lock to apply to the Location
      mode - The mode to apply to the Locations lock
    • findByCoordinate

      @GetMapping("/v1/locations") public org.springframework.http.ResponseEntity<List<LocationVO>> findByCoordinate(@RequestParam(value="area",required=false,defaultValue="%") String area, @RequestParam(value="aisle",required=false,defaultValue="%") String aisle, @RequestParam(value="x",required=false,defaultValue="%") String x, @RequestParam(value="y",required=false,defaultValue="%") String y, @RequestParam(value="z",required=false,defaultValue="%") String z)
    • index

      @GetMapping("/v1/locations/index") public org.springframework.http.ResponseEntity<org.openwms.core.http.Index> index()
    • changeLocation

      private void changeLocation(LockMode mode, Target target, Integer plcState, BiConsumer<Target,ErrorCodeVO> fnc)
    • locationNotFound

      private org.ameba.exception.NotFoundException locationNotFound(String erpCode)
    • unsupportedOperation

      private void unsupportedOperation(LockMode mode)
    • unsupportedOperation

      private void unsupportedOperation(LockType type)