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
FieldsFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy
QNAME -
Constructor Summary
ConstructorsConstructorDescriptionPeerAssociationEventConsolidator(AssociationRef associationRef, NodeResourceHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeDeleteAssociation(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) Get peer association type.Deque<org.alfresco.repo.event.v1.model.EventType>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.booleanWhether 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 Details
-
associationRef
-
-
Constructor Details
-
PeerAssociationEventConsolidator
-
-
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 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
Add peer association created event on create of a peer association.- Specified by:
onCreateAssociationin interfaceNodeServicePolicies.OnCreateAssociationPolicy- Parameters:
associationRef- AssociationRef
-
beforeDeleteAssociation
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
Get peer association type.- Returns:
- QName the peer association type
-
getEventTypes
Get event types.- Returns:
- Deque
queue of event types
-