Class CompletedOutboundSyncEvent

All Implemented Interfaces:
Serializable

@Immutable public final class CompletedOutboundSyncEvent extends ItemGroupOutboundSyncEvent
Event triggered for every item, for which synchronization has been attempted during a cron job run.
See Also:
  • Constructor Details

    • CompletedOutboundSyncEvent

      public CompletedOutboundSyncEvent(PK cronJobPk, boolean success, int changesCnt)
      Instantiates this event.
      Parameters:
      cronJobPk - primary key of the job that processed the item synchronization
      success - true, if synchronization was successful; false otherwise.
      changesCnt - number of changes processed during the item synchronization.
    • CompletedOutboundSyncEvent

      public CompletedOutboundSyncEvent(@NotNull @NotNull OutboundItemDTOGroup group, boolean success)
      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; false otherwise.
    • 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; false otherwise.
  • Method Details

    • successfulSync

      public static CompletedOutboundSyncEvent successfulSync(OutboundItemDTO item)
      Creates an instance of the CompletedOutboundSyncEvent for 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; false otherwise.
    • 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

      public boolean equals(Object o)
      Overrides:
      equals in class OutboundSyncEvent
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class OutboundSyncEvent
    • toString

      public String toString()
      Overrides:
      toString in class AbstractEvent