Class ItemSavedEvent

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
de.hybris.platform.servicelayer.event.events.AbstractEvent
de.hybris.platform.webhookservices.event.ItemSavedEvent
All Implemented Interfaces:
WebhookEvent, Serializable

public class ItemSavedEvent extends AbstractEvent implements WebhookEvent
A saved event implementation of WebhookEvent and wraps the AfterSaveEvent
See Also:
  • Constructor Details

    • ItemSavedEvent

      public ItemSavedEvent(AfterSaveEvent event)
      Instantiates an ItemSavedEvent
      Parameters:
      event - The AfterSaveEvent that is wrapped.
    • ItemSavedEvent

      public ItemSavedEvent(AfterSaveEvent event, boolean createdFromNestedItemEvent)
      Instantiates an ItemSavedEvent
      Parameters:
      event - The AfterSaveEvent that is wrapped.
      createdFromNestedItemEvent - boolean indicating if this is a parent event the was created by a nested child item
  • Method Details

    • isCreatedFromNestedItemEvent

      public boolean isCreatedFromNestedItemEvent()
      Description copied from interface: WebhookEvent
      Indicates whether this event was created from a child event
      Specified by:
      isCreatedFromNestedItemEvent in interface WebhookEvent
      Returns:
      true if it's created from a child event, otherwise, false When true, then getPk() returns PK of root item instead of the changed item PK. When false, then it's PK of the changed item.
    • getPk

      public PK getPk()
      Description copied from interface: WebhookEvent
      Retrieves the changed item pk
      Specified by:
      getPk in interface WebhookEvent
      Returns:
      pk
    • getEventType

      public EventType getEventType()
      Description copied from interface: WebhookEvent
      Retrieves the type of the event.
      Specified by:
      getEventType in interface WebhookEvent
      Returns:
      EventType
    • getSavedItemPk

      @Deprecated(since="2105.0", forRemoval=true) public PK getSavedItemPk()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 2105.0 Use getPk() instead
    • getType

      @Deprecated(since="2105.0", forRemoval=true) public ItemSavedEventType getType()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Since 2105.0. Use getOperation() instead

      Retrieves the type of the event.

      Returns:
      ItemSavedEventType
    • toString

      public String toString()
      Overrides:
      toString in class AbstractEvent
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object