Class CompletedOutboundSyncEvent
java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
de.hybris.platform.servicelayer.event.events.AbstractEvent
de.hybris.platform.outboundsync.events.OutboundSyncEvent
de.hybris.platform.outboundsync.events.ItemGroupOutboundSyncEvent
de.hybris.platform.outboundsync.events.CompletedOutboundSyncEvent
- All Implemented Interfaces:
Serializable
Event triggered for every item, for which synchronization has been attempted during a cron job run.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCompletedOutboundSyncEvent(@NotNull OutboundItemDTOGroup group, boolean success) Instantiates this event.CompletedOutboundSyncEvent(@NotNull Collection<OutboundItemDTOGroup> groups, boolean success) Instantiates this event.CompletedOutboundSyncEvent(PK cronJobPk, boolean success, int changesCnt) Instantiates this event. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintRetrieves number of changes processed for the item.inthashCode()booleanDetermines whether the item was synchronized successfully or not.static CompletedOutboundSyncEventCreates an instance of theCompletedOutboundSyncEventfor successful synchronization of a single item.toString()Methods inherited from class de.hybris.platform.outboundsync.events.ItemGroupOutboundSyncEvent
getGroupItemPKsMethods inherited from class de.hybris.platform.outboundsync.events.OutboundSyncEvent
getCronJobPkMethods inherited from class de.hybris.platform.servicelayer.event.events.AbstractEvent
getScope, getSource, isFromCluster, setFromCluster, setScopeMethods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
-
Constructor Details
-
CompletedOutboundSyncEvent
Instantiates this event.- Parameters:
cronJobPk- primary key of the job that processed the item synchronizationsuccess-true, if synchronization was successful;falseotherwise.changesCnt- number of changes processed during the item synchronization.
-
CompletedOutboundSyncEvent
Instantiates this event.- Parameters:
group- a group of items processed by the outbound sync and reported in this event.success-true, if synchronization of the items was successful;falseotherwise.
-
CompletedOutboundSyncEvent
public CompletedOutboundSyncEvent(@NotNull @NotNull Collection<OutboundItemDTOGroup> groups, boolean success) Instantiates this event.- Parameters:
groups- a Collection of groups of items processed by the outbound sync and reported in this event.success-true, if synchronization of the items was successful;falseotherwise.
-
-
Method Details
-
successfulSync
Creates an instance of theCompletedOutboundSyncEventfor successful synchronization of a single item.- Parameters:
item- an item that was successfully synchronized with an external system.- Returns:
- a new intance of the event for successful synchronization of a single item.
-
isSuccess
public boolean isSuccess()Determines whether the item was synchronized successfully or not.- Returns:
true, if synchronization was successful;falseotherwise.
-
getChangesCompleted
public int getChangesCompleted()Retrieves number of changes processed for the item. It's possible that single item synchronizes multiple changes, which is especially true in cases when items related to the root integration object item change. For example, in case of multiple order entries changes, only one order entry item will be synchronized for all those changes.- Returns:
- number of changes processed for the item.
-
equals
- Overrides:
equalsin classOutboundSyncEvent
-
hashCode
public int hashCode()- Overrides:
hashCodein classOutboundSyncEvent
-
toString
- Overrides:
toStringin classAbstractEvent
-