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 LocationServiceprivate static final org.slf4j.Loggerprivate final org.springframework.context.ApplicationEventPublisherprivate final TransportUnitRepositoryprivate final TimeProviderprivate final TransportUnitService -
Constructor Summary
ConstructorsConstructorDescriptionTransportUnitSynchronizerImpl(TransportUnitRepository repository, TransportUnitService transportUnitService, LocationService locationService, org.springframework.context.ApplicationEventPublisher publisher) -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeState(@NotBlank String foreignPKey, @NotBlank String state) Change the availability state of aTransportUnit.voidmove(@NotBlank String foreignPKey, @NotBlank String actualLocationId, @NotNull LocalDateTime actualLocationDate) Move an existingTransportUnitto a newLocation.private intnumberOfTransportUnits(Location location) private voidrequestInstance(@NotEmpty String foreignPKey) @NotNull TransportUnitsynchronize(@NotNull TransportUnit transportUnit) private LocationtrackInventoryChange(Location location) voidupdate(@NotNull org.openwms.common.transport.api.messages.TransportUnitMO mo) Update aTransportUnitwith 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:
synchronizein interfaceSynchronizer<TransportUnit>
-
numberOfTransportUnits
-
move
@Measured public void move(@NotBlank @NotBlank String foreignPKey, @NotBlank @NotBlank String actualLocationId, @NotNull @NotNull LocalDateTime actualLocationDate) Move an existingTransportUnitto a newLocation.- Specified by:
movein 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 aTransportUnitwith values from the golden source.- Specified by:
updatein 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:
changeStatein interfaceTransportUnitSynchronizer- Parameters:
foreignPKey- The persistent key of the TransportUnit on the golden sourcestate- The new state to change to
-