Class BaseWebhookEvent

java.lang.Object
java.util.EventObject
org.springframework.context.ApplicationEvent
de.hybris.platform.servicelayer.event.events.AbstractEvent
de.hybris.platform.webhookservices.event.BaseWebhookEvent
All Implemented Interfaces:
WebhookEvent, Serializable
Direct Known Subclasses:
ItemCreatedEvent, ItemDeletedEvent, ItemUpdatedEvent

public class BaseWebhookEvent extends AbstractEvent implements WebhookEvent
Base event that implements WebhookEvent
See Also:
  • Constructor Details

    • BaseWebhookEvent

      protected BaseWebhookEvent(@NotNull @NotNull PK pk, @NotNull @NotNull EventType eventType)
      Instantiates an BaseWebhookEvent
      Parameters:
      pk - PK of the found item.
      eventType - event type of EventType that is wrapped.
    • BaseWebhookEvent

      protected BaseWebhookEvent(@NotNull @NotNull PK pk, @NotNull @NotNull EventType eventType, boolean createdFromNestedItemEvent)
      Instantiates an BaseWebhookEvent
      Parameters:
      pk - PK of the found item.
      eventType - event type of EventType that is wrapped.
      createdFromNestedItemEvent - boolean indicating if this is a parent event the was created by a nested child event
  • Method Details

    • 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
    • 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.