Class ChildAssociationEventConsolidator

java.lang.Object
org.alfresco.repo.event2.ChildAssociationEventConsolidator
All Implemented Interfaces:
ChildAssociationEventSupportedPolicies, NodeServicePolicies.BeforeDeleteChildAssociationPolicy, NodeServicePolicies.OnCreateChildAssociationPolicy, AssociationPolicy, Policy

public class ChildAssociationEventConsolidator extends Object implements ChildAssociationEventSupportedPolicies
Encapsulates child association events that occurred in a single transaction.
Author:
Chris Shields, Sara Aspery
  • Field Details

  • Constructor Details

  • Method Details

    • getRepoEvent

      public org.alfresco.repo.event.v1.model.RepoEvent<org.alfresco.repo.event.v1.model.DataAttributes<org.alfresco.repo.event.v1.model.ChildAssociationResource>> 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<org.alfresco.repo.event.v1.model.ChildAssociationResource> buildEventData(EventInfo eventInfo, org.alfresco.repo.event.v1.model.ChildAssociationResource resource)
    • onCreateChildAssociation

      public void onCreateChildAssociation(ChildAssociationRef childAssociationRef, boolean isNewNode)
      Add child association created event on create of a child association.
      Specified by:
      onCreateChildAssociation in interface NodeServicePolicies.OnCreateChildAssociationPolicy
      Parameters:
      childAssociationRef - ChildAssociationRef
      isNewNode - true if the node is new or false if the node is being linked in
    • beforeDeleteChildAssociation

      public void beforeDeleteChildAssociation(ChildAssociationRef childAssociationRef)
      Add child association deleted event on delete of a child association.
      Specified by:
      beforeDeleteChildAssociation in interface NodeServicePolicies.BeforeDeleteChildAssociationPolicy
      Parameters:
      childAssociationRef - ChildAssociationRef
    • isTemporaryChildAssociation

      public boolean isTemporaryChildAssociation()
      Whether or not the child association has been created and then deleted, i.e. a temporary child association.
      Returns:
      true if the child association has been created and then deleted, otherwise false
    • getChildAssocType

      public QName getChildAssocType()
      Get child association type.
      Returns:
      QName the child association type
    • getEventTypes

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