Class EventConsolidator<REF extends EntityRef,RES extends org.alfresco.repo.event.v1.model.Resource>

java.lang.Object
org.alfresco.repo.event2.EventConsolidator<REF,RES>
Type Parameters:
REF - entity (e.g. node, child association, peer association) reference type
RES - entity resource type
Direct Known Subclasses:
ChildAssociationEventConsolidator, NodeEventConsolidator, PeerAssociationEventConsolidator

public abstract class EventConsolidator<REF extends EntityRef,RES extends org.alfresco.repo.event.v1.model.Resource> extends Object
Encapsulates events occurred in a single transaction.
  • Field Details

    • eventTypes

      protected final Deque<org.alfresco.repo.event.v1.model.EventType> eventTypes
    • helper

      protected final NodeResourceHelper helper
    • entityReference

      protected REF extends EntityRef entityReference
    • resource

      protected RES extends org.alfresco.repo.event.v1.model.Resource resource
  • Constructor Details

    • EventConsolidator

      public EventConsolidator(REF entityReference, NodeResourceHelper nodeResourceHelper)
  • Method Details

    • getEntityType

      public abstract QName getEntityType()
      Get entity (e.g. node, peer association, child association) type.
      Returns:
      QName the peer association type
    • isTemporaryEntity

      public abstract boolean isTemporaryEntity()
      Whether the entity has been created and then deleted, e.g. a temporary node.
      Returns:
      true if the node has been created and then deleted, otherwise false
    • getDerivedEvent

      protected abstract org.alfresco.repo.event.v1.model.EventType getDerivedEvent()
      Get a derived event for a transaction.
      Returns:
      a derived event type
    • getEventTypes

      public Deque<org.alfresco.repo.event.v1.model.EventType> getEventTypes()
      Get event types.
      Returns:
      Deque queue of event types
    • getRepoEvent

      public org.alfresco.repo.event.v1.model.RepoEvent<org.alfresco.repo.event.v1.model.DataAttributes<RES>> getRepoEvent(EventInfo eventInfo)
      Builds and returns the RepoEvent instance.
      Parameters:
      eventInfo - the object holding the event information
      Returns:
      the RepoEvent instance
    • buildEventData

      protected org.alfresco.repo.event.v1.model.DataAttributes<RES> buildEventData(EventInfo eventInfo, RES resource, org.alfresco.repo.event.v1.model.EventType eventType)
      Provides primary event data.