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
Fields Modifier and Type Field Description protected ChildAssociationRefchildAssociationRef-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteChildAssociationPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy
QNAME
-
-
Constructor Summary
Constructors Constructor Description ChildAssociationEventConsolidator(ChildAssociationRef childAssociationRef, NodeResourceHelper helper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeDeleteChildAssociation(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)QNamegetChildAssocType()Get child 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.ChildAssociationResource>>getRepoEvent(EventInfo eventInfo)Builds and returns theRepoEventinstance.booleanisTemporaryChildAssociation()Whether 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 Detail
-
childAssociationRef
protected final ChildAssociationRef childAssociationRef
-
-
Constructor Detail
-
ChildAssociationEventConsolidator
public ChildAssociationEventConsolidator(ChildAssociationRef childAssociationRef, 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.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
public void onCreateChildAssociation(ChildAssociationRef childAssociationRef, boolean isNewNode)
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
public void beforeDeleteChildAssociation(ChildAssociationRef childAssociationRef)
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
public QName getChildAssocType()
Get child association type.- Returns:
- QName the child association type
-
-