Class TransportUnitSynchronizerImpl

java.lang.Object
org.openwms.wms.transport.impl.TransportUnitSynchronizerImpl
All Implemented Interfaces:
Synchronizer<TransportUnit>, TransportUnitSynchronizer

@Validated @TxService class TransportUnitSynchronizerImpl extends Object implements TransportUnitSynchronizer
A TransportUnitSynchronizerImpl is a transactional Spring managed service to synchronize TransportUnit changes on the golden source.
Author:
Heiko Scherrer
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • timeProvider

      private final TimeProvider timeProvider
    • repository

      private final TransportUnitRepository repository
    • transportUnitService

      private final TransportUnitService transportUnitService
    • locationService

      private final LocationService locationService
    • publisher

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

  • Method Details

    • synchronize

      @Retryable @Transactional(propagation=REQUIRES_NEW) @Measured @NotNull public @NotNull TransportUnit synchronize(@NotNull @NotNull TransportUnit transportUnit)
      Specified by:
      synchronize in interface Synchronizer<TransportUnit>
    • numberOfTransportUnits

      private int numberOfTransportUnits(Location location)
    • move

      @Measured public void move(@NotBlank @NotBlank String foreignPKey, @NotBlank @NotBlank String actualLocationId, @NotNull @NotNull Date actualLocationDate)
      Move an existing TransportUnit to a new Location.
      Specified by:
      move in interface TransportUnitSynchronizer
      Parameters:
      foreignPKey - The persistent key of the TransportUnit on the golden source
      actualLocationId - The locationId of the new actualLocation
      actualLocationDate - Since when the TransportUnit is on the actualLocation
    • trackInventoryChange

      private Location trackInventoryChange(Location location)
    • requestInstance

      private void requestInstance(@NotEmpty @NotEmpty String foreignPKey)
    • update

      @Measured public void update(@NotNull @NotNull org.openwms.common.transport.api.messages.TransportUnitMO mo)
      Update a TransportUnit with values from the golden source.
      Specified by:
      update in interface TransportUnitSynchronizer
      Parameters:
      mo - The message object containing all the TransportUnit information
    • changeState

      @Measured public void changeState(@NotBlank @NotBlank String foreignPKey, @NotBlank @NotBlank String state)
      Change the availability state of a TransportUnit.
      Specified by:
      changeState in interface TransportUnitSynchronizer
      Parameters:
      foreignPKey - The persistent key of the TransportUnit on the golden source
      state - The new state to change to