Class TargetController

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

@Profile("!INMEM") @Validated @MeasuredRestController class TargetController extends org.openwms.core.http.AbstractWebController
A TargetController represents the REST API to handle the state and availability of Targets.
Author:
Heiko Scherrer
  • Field Details

    • translator

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

      private final LocationService locationService
    • locationGroupService

      private final LocationGroupService locationGroupService
    • ctx

      private final org.springframework.context.ApplicationContext ctx
  • Constructor Details

    • TargetController

      TargetController(org.ameba.i18n.Translator translator, LocationService locationService, LocationGroupService locationGroupService, org.springframework.context.ApplicationContext ctx)
  • Method Details

    • changeState

      @PostMapping(path="/v1/targets/{targetBK}", params={"type!=PERMANENT_LOCK","mode"}) public void changeState(@PathVariable("targetBK") String targetBK, @RequestParam("type") LockType type, @RequestParam("mode") LockMode mode)
      Change the current mode a Target, identified by targetBK operates in.
      Parameters:
      targetBK - The business key of the Target, can be a LocationPK in String format or a LocationGroup name
      type - The type of lock to apply to the Target
      mode - The mode to apply to the Targets lock
    • changeLocation

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

      private void changeLocationGroupState(LockMode mode, Target target, BiConsumer<Target,LocationGroupState[]> fnc)
    • changeLocationGroupMode

      private void changeLocationGroupMode(LockMode mode, LocationGroup target, BiConsumer<LocationGroup,String> fnc)
    • unsupportedOperation

      private void unsupportedOperation(LockMode mode)
    • unsupportedOperation

      private void unsupportedOperation(LockType type)
    • lock

      @PostMapping(path="/v1/targets/{targetBK}", params={"type=PERMANENT_LOCK","mode=lock"}) public void lock(@PathVariable("targetBK") String targetBK, @RequestParam(value="reallocation",required=false) Boolean reAllocation)
      Lock the Target identified by targetBK.
      Parameters:
      targetBK - The business key of the Target, can be a LocationPK in String format or a LocationGroup name
      reAllocation - If true open outfeed orders will be re-allocated
    • release

      @ResponseStatus(OK) @PostMapping(value="/v1/targets/{targetBK}", params={"type=PERMANENT_LOCK","mode=unlock"}) public void release(@PathVariable("targetBK") String targetBK)
      Unlock or release the Target identified by targetBK.
      Parameters:
      targetBK - The business key of the Target, can be a LocationPK in String format or a LocationGroup name
    • raiseEvent

      private void raiseEvent(String targetBK, Boolean reAllocation, LockMode mode)