Package org.alfresco.repo.event2
Class EventGenerator
- java.lang.Object
-
- org.springframework.extensions.surf.util.AbstractLifecycleBean
-
- org.alfresco.repo.event2.EventGenerator
-
- All Implemented Interfaces:
EventListener,ChildAssociationEventSupportedPolicies,EventSupportedPolicies,PeerAssociationEventSupportedPolicies,NodeServicePolicies.BeforeDeleteAssociationPolicy,NodeServicePolicies.BeforeDeleteChildAssociationPolicy,NodeServicePolicies.BeforeDeleteNodePolicy,NodeServicePolicies.OnAddAspectPolicy,NodeServicePolicies.OnCreateAssociationPolicy,NodeServicePolicies.OnCreateChildAssociationPolicy,NodeServicePolicies.OnCreateNodePolicy,NodeServicePolicies.OnMoveNodePolicy,NodeServicePolicies.OnRemoveAspectPolicy,NodeServicePolicies.OnSetNodeTypePolicy,NodeServicePolicies.OnUpdatePropertiesPolicy,AssociationPolicy,ClassPolicy,Policy,org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener
public class EventGenerator extends org.springframework.extensions.surf.util.AbstractLifecycleBean implements org.springframework.beans.factory.InitializingBean, EventSupportedPolicies, ChildAssociationEventSupportedPolicies, PeerAssociationEventSupportedPolicies
Generates events and sends them to an event topic.- Author:
- Jamal Kaabi-Mofrad
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg
-
-
Field Summary
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteAssociationPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteChildAssociationPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnAddAspectPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnMoveNodePolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnRemoveAspectPolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnSetNodeTypePolicy
QNAME
-
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAME
-
-
Constructor Summary
Constructors Constructor Description EventGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voidbeforeDeleteAssociation(AssociationRef associationRef)Called before a regular node association is deleted.voidbeforeDeleteChildAssociation(ChildAssociationRef childAssociationRef)Called before a node child association is deleted.voidbeforeDeleteNode(NodeRef nodeRef)Called before a node is deleted.protected ChildAssociationEventConsolidatorcreateChildAssociationEventConsolidator(ChildAssociationRef childAssociationRef)protected EventConsolidatorcreateEventConsolidator()protected PeerAssociationEventConsolidatorcreatePeerAssociationEventConsolidator(AssociationRef peerAssociationRef)voidonAddAspect(NodeRef nodeRef, QName aspectTypeQName)Called after an aspect has been added to a nodeprotected voidonBootstrap(org.springframework.context.ApplicationEvent applicationEvent)voidonCreateAssociation(AssociationRef associationRef)Called after a regular node association is created.voidonCreateChildAssociation(ChildAssociationRef childAssociationRef, boolean isNewNode)Called after a node child association has been created.voidonCreateNode(ChildAssociationRef childAssocRef)Called when a new node has been created.voidonMoveNode(ChildAssociationRef oldChildAssocRef, ChildAssociationRef newChildAssocRef)Called when a node has been moved.voidonRemoveAspect(NodeRef nodeRef, QName aspectTypeQName)Called after an aspect has been removed from a nodevoidonSetNodeType(NodeRef nodeRef, QName before, QName after)Called after the type of a node is set explicitly.protected voidonShutdown(org.springframework.context.ApplicationEvent applicationEvent)voidonUpdateProperties(NodeRef nodeRef, Map<QName,Serializable> before, Map<QName,Serializable> after)Called after a node's properties have been changed.voidsetDescriptorService(DescriptorService descriptorService)voidsetDictionaryService(DictionaryService dictionaryService)voidsetEvent2MessageProducer(Event2MessageProducer event2MessageProducer)voidsetEventFilterRegistry(EventFilterRegistry eventFilterRegistry)voidsetNamespaceService(NamespaceService namespaceService)voidsetNodeResourceHelper(NodeResourceHelper nodeResourceHelper)voidsetNodeService(NodeService nodeService)voidsetPersonService(PersonService personService)voidsetPolicyComponent(PolicyComponent policyComponent)voidsetTransactionService(TransactionService transactionService)
-
-
-
Method Detail
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
-
setNodeService
public void setNodeService(NodeService nodeService)
-
setNamespaceService
public void setNamespaceService(NamespaceService namespaceService)
-
setDictionaryService
public void setDictionaryService(DictionaryService dictionaryService)
-
setDescriptorService
public void setDescriptorService(DescriptorService descriptorService)
-
setEventFilterRegistry
public void setEventFilterRegistry(EventFilterRegistry eventFilterRegistry)
-
setEvent2MessageProducer
public void setEvent2MessageProducer(Event2MessageProducer event2MessageProducer)
-
setTransactionService
public void setTransactionService(TransactionService transactionService)
-
setPersonService
public void setPersonService(PersonService personService)
-
setNodeResourceHelper
public void setNodeResourceHelper(NodeResourceHelper nodeResourceHelper)
-
onCreateNode
public void onCreateNode(ChildAssociationRef childAssocRef)
Description copied from interface:NodeServicePolicies.OnCreateNodePolicyCalled when a new node has been created.- Specified by:
onCreateNodein interfaceNodeServicePolicies.OnCreateNodePolicy- Parameters:
childAssocRef- the created child association reference
-
onMoveNode
public void onMoveNode(ChildAssociationRef oldChildAssocRef, ChildAssociationRef newChildAssocRef)
Description copied from interface:NodeServicePolicies.OnMoveNodePolicyCalled when a node has been moved.- Specified by:
onMoveNodein interfaceNodeServicePolicies.OnMoveNodePolicy- Parameters:
oldChildAssocRef- the child association reference prior to the movenewChildAssocRef- the child association reference after the move
-
onUpdateProperties
public void onUpdateProperties(NodeRef nodeRef, Map<QName,Serializable> before, Map<QName,Serializable> after)
Description copied from interface:NodeServicePolicies.OnUpdatePropertiesPolicyCalled after a node's properties have been changed.- Specified by:
onUpdatePropertiesin interfaceNodeServicePolicies.OnUpdatePropertiesPolicy- Parameters:
nodeRef- reference to the updated nodebefore- the node's properties before the changeafter- the node's properties after the change
-
onSetNodeType
public void onSetNodeType(NodeRef nodeRef, QName before, QName after)
Description copied from interface:NodeServicePolicies.OnSetNodeTypePolicyCalled after the type of a node is set explicitly.- Specified by:
onSetNodeTypein interfaceNodeServicePolicies.OnSetNodeTypePolicy- Parameters:
nodeRef- the node that has had its type set.before- the previous type of the node.after- the type the node has been given.
-
beforeDeleteNode
public void beforeDeleteNode(NodeRef nodeRef)
Description copied from interface:NodeServicePolicies.BeforeDeleteNodePolicyCalled before a node is deleted.- Specified by:
beforeDeleteNodein interfaceNodeServicePolicies.BeforeDeleteNodePolicy- Parameters:
nodeRef- the node reference
-
onAddAspect
public void onAddAspect(NodeRef nodeRef, QName aspectTypeQName)
Description copied from interface:NodeServicePolicies.OnAddAspectPolicyCalled after an aspect has been added to a node- Specified by:
onAddAspectin interfaceNodeServicePolicies.OnAddAspectPolicy- Parameters:
nodeRef- the node to which the aspect was addedaspectTypeQName- the type of the aspect
-
onRemoveAspect
public void onRemoveAspect(NodeRef nodeRef, QName aspectTypeQName)
Description copied from interface:NodeServicePolicies.OnRemoveAspectPolicyCalled after an aspect has been removed from a node- Specified by:
onRemoveAspectin interfaceNodeServicePolicies.OnRemoveAspectPolicy- Parameters:
nodeRef- the node from which the aspect will be removedaspectTypeQName- the type of the aspect
-
onCreateChildAssociation
public void onCreateChildAssociation(ChildAssociationRef childAssociationRef, boolean isNewNode)
Description copied from interface:NodeServicePolicies.OnCreateChildAssociationPolicyCalled after a node child association has been created.- Specified by:
onCreateChildAssociationin interfaceNodeServicePolicies.OnCreateChildAssociationPolicy- Parameters:
childAssociationRef- the child association that has been createdisNewNode- true if the node is new or false if the node is being linked in
-
beforeDeleteChildAssociation
public void beforeDeleteChildAssociation(ChildAssociationRef childAssociationRef)
Description copied from interface:NodeServicePolicies.BeforeDeleteChildAssociationPolicyCalled before a node child association is deleted.- Specified by:
beforeDeleteChildAssociationin interfaceNodeServicePolicies.BeforeDeleteChildAssociationPolicy- Parameters:
childAssociationRef- the child association to be deleted
-
onCreateAssociation
public void onCreateAssociation(AssociationRef associationRef)
Description copied from interface:NodeServicePolicies.OnCreateAssociationPolicyCalled after a regular node association is created.- Specified by:
onCreateAssociationin interfaceNodeServicePolicies.OnCreateAssociationPolicy- Parameters:
associationRef- the regular node association that was created
-
beforeDeleteAssociation
public void beforeDeleteAssociation(AssociationRef associationRef)
Description copied from interface:NodeServicePolicies.BeforeDeleteAssociationPolicyCalled before a regular node association is deleted.- Specified by:
beforeDeleteAssociationin interfaceNodeServicePolicies.BeforeDeleteAssociationPolicy- Parameters:
associationRef- the regular node association that will be removed
-
createEventConsolidator
protected EventConsolidator createEventConsolidator()
-
createChildAssociationEventConsolidator
protected ChildAssociationEventConsolidator createChildAssociationEventConsolidator(ChildAssociationRef childAssociationRef)
-
createPeerAssociationEventConsolidator
protected PeerAssociationEventConsolidator createPeerAssociationEventConsolidator(AssociationRef peerAssociationRef)
-
onBootstrap
protected void onBootstrap(org.springframework.context.ApplicationEvent applicationEvent)
- Specified by:
onBootstrapin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
onShutdown
protected void onShutdown(org.springframework.context.ApplicationEvent applicationEvent)
- Specified by:
onShutdownin classorg.springframework.extensions.surf.util.AbstractLifecycleBean
-
-