Package org.openwms.wms.location.impl
Class LocationSynchronizerImpl
java.lang.Object
org.openwms.wms.location.impl.LocationSynchronizerImpl
- All Implemented Interfaces:
LocationSynchronizer
A LocationSynchronizerImpl is a Spring managed transaction service that is responsible to synchronize the state of
Location
s with
the golden source.- Author:
- Heiko Scherrer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.springframework.context.ApplicationEventPublisher
private static final org.slf4j.Logger
private final LocationMapper
private final LocationRepository
private final org.ameba.i18n.Translator
-
Constructor Summary
ConstructorsConstructorDescriptionLocationSynchronizerImpl
(org.ameba.i18n.Translator translator, LocationMapper mapper, LocationRepository repository, org.springframework.context.ApplicationEventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionvoid
changeState
(@NotBlank String foreignPKey, Boolean incomingActive, Boolean outgoingActive, Integer plcState) Change the state of aLocation
.void
create
(@NotNull org.openwms.common.location.api.messages.LocationMO location) Create a newLocation
on demand.void
Deletes aLocation
with the given foreign persistent key.private Location
findByForeignPKeyInternal
(String foreignPKey) void
rollbackDeletionMark
(@NotBlank String foreignPKey) Unset a previously set removal marker on theLocation
with the given foreign persistent key.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
translator
private final org.ameba.i18n.Translator translator -
mapper
-
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 newLocation
on demand.- Specified by:
create
in interfaceLocationSynchronizer
- 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 aLocation
.- Specified by:
changeState
in interfaceLocationSynchronizer
- Parameters:
foreignPKey
- The foreign persistent key of the Location instanceincomingActive
- The state for incoming or inbound goodsoutgoingActive
- The state for outgoing or outbound goodsplcState
- The PLC state of the Location
-
delete
Deletes aLocation
with the given foreign persistent key.- Specified by:
delete
in interfaceLocationSynchronizer
- Parameters:
foreignPKey
- The foreign persistent key of theLocation
instance.
-
rollbackDeletionMark
Unset a previously set removal marker on theLocation
with the given foreign persistent key.- Specified by:
rollbackDeletionMark
in interfaceLocationSynchronizer
- Parameters:
foreignPKey
- The foreign persistent key of theLocation
instance.
-
findByForeignPKeyInternal
-