Package org.alfresco.repo.event2
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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg
-
-
Field Summary
Fields Modifier and Type Field Description protected AssociationRefassociationRef-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteAssociationPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy
QNAME
-
-
Constructor Summary
Constructors Constructor Description PeerAssociationEventConsolidator(AssociationRef associationRef, NodeResourceHelper helper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeDeleteAssociation(AssociationRef associationRef)Add peer association deleted event on delete of a peer association.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)QNamegetAssocType()Get peer association type.Deque<EventType>getEventTypes()Get event types.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 theRepoEventinstance.booleanisTemporaryPeerAssociation()Whether or not the association has been created and then deleted, i.e.voidonCreateAssociation(AssociationRef associationRef)Add peer association created event on create of a peer association.
-
-
-
Field Detail
-
associationRef
protected final AssociationRef associationRef
-
-
Constructor Detail
-
PeerAssociationEventConsolidator
public PeerAssociationEventConsolidator(AssociationRef associationRef, NodeResourceHelper helper)
-
-
Method Detail
-
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 theRepoEventinstance.- Parameters:
eventInfo- the object holding the event information- Returns:
- the
RepoEventinstance
-
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:
onCreateAssociationin interfaceNodeServicePolicies.OnCreateAssociationPolicy- Parameters:
associationRef- AssociationRef
-
beforeDeleteAssociation
public void beforeDeleteAssociation(AssociationRef associationRef)
Add peer association deleted event on delete of a peer association.- Specified by:
beforeDeleteAssociationin interfaceNodeServicePolicies.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:
trueif the association has been created and then deleted, otherwise false
-
getAssocType
public QName getAssocType()
Get peer association type.- Returns:
- QName the peer association type
-
-