Class PeerAssociationEventConsolidator

java.lang.Object
org.alfresco.repo.event2.PeerAssociationEventConsolidator
All Implemented Interfaces:
PeerAssociationEventSupportedPolicies, NodeServicePolicies.BeforeDeleteAssociationPolicy, NodeServicePolicies.OnCreateAssociationPolicy, AssociationPolicy, Policy

public class PeerAssociationEventConsolidator extends Object implements PeerAssociationEventSupportedPolicies
Encapsulates peer association events occurred in a single transaction.
Author:
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.PeerAssociationResource>> 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.PeerAssociationResource> buildEventData(EventInfo eventInfo, org.alfresco.repo.event.v1.model.PeerAssociationResource resource)
    • onCreateAssociation

      public void onCreateAssociation(AssociationRef associationRef)
      Add peer association created event on create of a peer association.
      Specified by:
      onCreateAssociation in interface NodeServicePolicies.OnCreateAssociationPolicy
      Parameters:
      associationRef - AssociationRef
    • beforeDeleteAssociation

      public void beforeDeleteAssociation(AssociationRef associationRef)
      Add peer association deleted event on delete of a peer association.
      Specified by:
      beforeDeleteAssociation in interface NodeServicePolicies.BeforeDeleteAssociationPolicy
      Parameters:
      associationRef - AssociationRef
    • isTemporaryPeerAssociation

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

      public QName getAssocType()
      Get peer association type.
      Returns:
      QName the peer association type
    • getEventTypes

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