Class LocationSynchronizerImpl

java.lang.Object
org.openwms.wms.location.impl.LocationSynchronizerImpl
All Implemented Interfaces:
LocationSynchronizer

@Validated @TxService class LocationSynchronizerImpl extends Object implements LocationSynchronizer
A LocationSynchronizerImpl is a Spring managed transaction service that is responsible to synchronize the state of Locations with the golden source.
Author:
Heiko Scherrer
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • translator

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

      private final LocationMapper mapper
    • repository

      private final LocationRepository repository
    • eventPublisher

      private final org.springframework.context.ApplicationEventPublisher eventPublisher
  • Constructor Details

    • LocationSynchronizerImpl

      LocationSynchronizerImpl(org.ameba.i18n.Translator translator, LocationMapper mapper, LocationRepository repository, org.springframework.context.ApplicationEventPublisher eventPublisher)
  • Method Details

    • create

      @Measured public void create(@NotNull @NotNull org.openwms.common.location.api.messages.LocationMO location)
      Create a new Location on demand.
      Specified by:
      create in interface LocationSynchronizer
      Parameters:
      location - The instance to create
    • changeState

      @Measured public void changeState(@NotBlank @NotBlank String foreignPKey, Boolean incomingActive, Boolean outgoingActive, Integer plcState)
      Change the state of a Location.
      Specified by:
      changeState in interface LocationSynchronizer
      Parameters:
      foreignPKey - The foreign persistent key of the Location instance
      incomingActive - The state for incoming or inbound goods
      outgoingActive - The state for outgoing or outbound goods
      plcState - The PLC state of the Location
    • delete

      @Measured public void delete(@NotBlank @NotBlank String foreignPKey)
      Deletes a Location with the given foreign persistent key.
      Specified by:
      delete in interface LocationSynchronizer
      Parameters:
      foreignPKey - The foreign persistent key of the Location instance.
    • rollbackDeletionMark

      @Measured public void rollbackDeletionMark(@NotBlank @NotBlank String foreignPKey)
      Unset a previously set removal marker on the Location with the given foreign persistent key.
      Specified by:
      rollbackDeletionMark in interface LocationSynchronizer
      Parameters:
      foreignPKey - The foreign persistent key of the Location instance.
    • findByForeignPKeyInternal

      private Location findByForeignPKeyInternal(String foreignPKey)