Class LocationServiceImpl

java.lang.Object
org.openwms.wms.location.impl.LocationServiceImpl
All Implemented Interfaces:
LocationService, LocationSynchronizer

@Validated @TxService class LocationServiceImpl extends Object implements LocationService, LocationSynchronizer
A LocationServiceImpl is a Spring managed transaction service that cares about Location management.
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

    • LocationServiceImpl

      LocationServiceImpl(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
    • findByForeignPKey

      @Measured @NotNull public @NotNull Location findByForeignPKey(@NotBlank @NotBlank String foreignPKey)
      Find and return a Location identified by the persistent key.
      Specified by:
      findByForeignPKey in interface LocationService
      Parameters:
      foreignPKey - The foreign persistent key of the Location instance
      Returns:
      The instance
    • findByForeignPKeyInternal

      private Location findByForeignPKeyInternal(String foreignPKey)
    • findOptionalByID

      @Measured public Optional<Location> findOptionalByID(@NotNull @NotNull LocationPK locationId)
      Find and return the Location identified by the business key.
      Specified by:
      findOptionalByID in interface LocationService
      Parameters:
      locationId - The coordinate of the Location
      Returns:
      The instance
    • findByBK

      @Measured @NotNull public @NotNull Location findByBK(@NotNull @NotNull LocationPK locationId)
      Find and return the Location identified by the business key.
      Specified by:
      findByBK in interface LocationService
      Parameters:
      locationId - The coordinate of the Location
      Returns:
      The instance
    • findByErpCode

      @Measured @NotNull public @NotNull Location findByErpCode(@NotBlank @NotBlank String erpCode)
      Find and return the Location identified by the unique erpCode.
      Specified by:
      findByErpCode in interface LocationService
      Parameters:
      erpCode - The unique ERP code
      Returns:
      The instance
    • findOptionalByErpCode

      @Measured public Optional<Location> findOptionalByErpCode(@NotBlank @NotBlank String erpCode)
      Find and return the Location identified by the unique erpCode.
      Specified by:
      findOptionalByErpCode in interface LocationService
      Parameters:
      erpCode - The unique ERP code
      Returns:
      The instance
    • save

      @Measured @NotNull public @NotNull Location save(@NotNull @NotNull Location location)
      Save a Location.
      Specified by:
      save in interface LocationService
      Parameters:
      location - The instance to save
      Returns:
      The saved instance