Package org.alfresco.repo.event2
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
-
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.BeforeDeleteChildAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy
QNAME -
Constructor Summary
ConstructorsConstructorDescriptionChildAssociationEventConsolidator(ChildAssociationRef childAssociationRef, NodeResourceHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeDeleteChildAssociation(ChildAssociationRef childAssociationRef) Add child association deleted event on delete of a child association.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) Get child 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.ChildAssociationResource>>getRepoEvent(EventInfo eventInfo) Builds and returns theRepoEventinstance.booleanWhether or not the child association has been created and then deleted, i.e.voidonCreateChildAssociation(ChildAssociationRef childAssociationRef, boolean isNewNode) Add child association created event on create of a child association.
-
Field Details
-
childAssociationRef
-
-
Constructor Details
-
ChildAssociationEventConsolidator
public ChildAssociationEventConsolidator(ChildAssociationRef childAssociationRef, NodeResourceHelper helper)
-
-
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 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.ChildAssociationResource> buildEventData(EventInfo eventInfo, org.alfresco.repo.event.v1.model.ChildAssociationResource resource) -
onCreateChildAssociation
Add child association created event on create of a child association.- Specified by:
onCreateChildAssociationin interfaceNodeServicePolicies.OnCreateChildAssociationPolicy- Parameters:
childAssociationRef- ChildAssociationRefisNewNode- true if the node is new or false if the node is being linked in
-
beforeDeleteChildAssociation
Add child association deleted event on delete of a child association.- Specified by:
beforeDeleteChildAssociationin interfaceNodeServicePolicies.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:
trueif the child association has been created and then deleted, otherwise false
-
getChildAssocType
Get child association type.- Returns:
- QName the child association type
-
getEventTypes
Get event types.- Returns:
- Deque
queue of event types
-