Package org.openwms.wms.transport.impl
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 Summary
FieldsModifier and TypeFieldDescriptionprivate final LocationService
private static final org.slf4j.Logger
private final org.springframework.context.ApplicationEventPublisher
private final TransportUnitRepository
private final TimeProvider
private final TransportUnitService
-
Constructor Summary
ConstructorsConstructorDescriptionTransportUnitSynchronizerImpl
(TransportUnitRepository repository, TransportUnitService transportUnitService, LocationService locationService, org.springframework.context.ApplicationEventPublisher publisher) -
Method Summary
Modifier and TypeMethodDescriptionvoid
changeState
(@NotBlank String foreignPKey, @NotBlank String state) Change the availability state of aTransportUnit
.void
move
(@NotBlank String foreignPKey, @NotBlank String actualLocationId, @NotNull Date actualLocationDate) Move an existingTransportUnit
to a newLocation
.private int
numberOfTransportUnits
(Location location) private void
requestInstance
(@NotEmpty String foreignPKey) @NotNull TransportUnit
synchronize
(@NotNull TransportUnit transportUnit) private Location
trackInventoryChange
(Location location) void
update
(@NotNull org.openwms.common.transport.api.messages.TransportUnitMO mo) Update aTransportUnit
with values from the golden source.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
timeProvider
-
repository
-
transportUnitService
-
locationService
-
publisher
private final org.springframework.context.ApplicationEventPublisher publisher
-
-
Constructor Details
-
TransportUnitSynchronizerImpl
TransportUnitSynchronizerImpl(TransportUnitRepository repository, TransportUnitService transportUnitService, LocationService locationService, org.springframework.context.ApplicationEventPublisher publisher)
-
-
Method Details
-
synchronize
@Retryable @Transactional(propagation=REQUIRES_NEW) @Measured @NotNull public @NotNull TransportUnit synchronize(@NotNull @NotNull TransportUnit transportUnit) - Specified by:
synchronize
in interfaceSynchronizer<TransportUnit>
-
numberOfTransportUnits
-
move
@Measured public void move(@NotBlank @NotBlank String foreignPKey, @NotBlank @NotBlank String actualLocationId, @NotNull @NotNull Date actualLocationDate) Move an existingTransportUnit
to a newLocation
.- Specified by:
move
in interfaceTransportUnitSynchronizer
- Parameters:
foreignPKey
- The persistent key of the TransportUnit on the golden sourceactualLocationId
- The locationId of the new actualLocationactualLocationDate
- Since when the TransportUnit is on the actualLocation
-
trackInventoryChange
-
requestInstance
-
update
@Measured public void update(@NotNull @NotNull org.openwms.common.transport.api.messages.TransportUnitMO mo) Update aTransportUnit
with values from the golden source.- Specified by:
update
in interfaceTransportUnitSynchronizer
- 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 aTransportUnit
.- Specified by:
changeState
in interfaceTransportUnitSynchronizer
- Parameters:
foreignPKey
- The persistent key of the TransportUnit on the golden sourcestate
- The new state to change to
-