Package org.alfresco.repo.node.integrity
Class IncompleteNodeTagger
java.lang.Object
org.alfresco.util.transaction.TransactionListenerAdapter
org.alfresco.repo.node.integrity.IncompleteNodeTagger
- All Implemented Interfaces:
NodeServicePolicies.OnAddAspectPolicy,NodeServicePolicies.OnCreateAssociationPolicy,NodeServicePolicies.OnCreateChildAssociationPolicy,NodeServicePolicies.OnCreateNodePolicy,NodeServicePolicies.OnDeleteAssociationPolicy,NodeServicePolicies.OnDeleteChildAssociationPolicy,NodeServicePolicies.OnRemoveAspectPolicy,NodeServicePolicies.OnUpdatePropertiesPolicy,AssociationPolicy,ClassPolicy,Policy,org.alfresco.util.transaction.TransactionListener
public class IncompleteNodeTagger
extends org.alfresco.util.transaction.TransactionListenerAdapter
implements NodeServicePolicies.OnCreateNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnCreateChildAssociationPolicy, NodeServicePolicies.OnDeleteChildAssociationPolicy, NodeServicePolicies.OnCreateAssociationPolicy, NodeServicePolicies.OnDeleteAssociationPolicy
Component that tags
incomplete nodes.- Author:
- Derek Hulley
-
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.OnAddAspectPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateNodePolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnDeleteAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnDeleteChildAssociationPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnRemoveAspectPolicy
QNAMEFields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeCommit(boolean readOnly) Process all the nodes that require checking within the transaction.voidinit()Registers the system-level policy behavioursvoidonAddAspect(NodeRef nodeRef, QName aspectTypeQName) Called after an aspect has been added to a nodevoidonCreateAssociation(AssociationRef nodeAssocRef) Called after a regular node association is created.voidonCreateChildAssociation(ChildAssociationRef childAssocRef, boolean isNew) Called after a node child association has been created.voidonCreateNode(ChildAssociationRef childAssocRef) Called when a new node has been created.voidonDeleteAssociation(AssociationRef nodeAssocRef) Called after a regular node association is deleted.voidonDeleteChildAssociation(ChildAssociationRef childAssocRef) Called after a node child association has been deleted.voidonRemoveAspect(NodeRef nodeRef, QName aspectTypeQName) Recheck the node as an aspect was removed.voidonUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after) Called after a node's properties have been changed.voidsetBehaviourFilter(BehaviourFilter behaviourFilter) voidsetDictionaryService(DictionaryService dictionaryService) voidsetNodeService(NodeService nodeService) voidsetPolicyComponent(PolicyComponent policyComponent) voidsetPropertiesToIgnore(List<String> propertiesToIgnore) voidsetStoresToIgnore(List<String> storesToIgnore) Methods inherited from class org.alfresco.util.transaction.TransactionListenerAdapter
afterCommit, afterRollback, beforeCompletion
-
Constructor Details
-
IncompleteNodeTagger
public IncompleteNodeTagger()
-
-
Method Details
-
setPolicyComponent
- Parameters:
policyComponent- the component to register behaviour with
-
setDictionaryService
- Parameters:
dictionaryService- the dictionary against which to confirm model details
-
setNodeService
- Parameters:
nodeService- the node service to use for browsing node structures
-
setStoresToIgnore
- Parameters:
storesToIgnore- stores (eg. workspace://version2Store) which will be ignored by IncompleteNodeTagger. Note: assumes associations are within a store.
-
setPropertiesToIgnore
- Parameters:
propertiesToIgnore- a list of property fully-qualified names to ignore
-
setBehaviourFilter
-
init
public void init()Registers the system-level policy behaviours -
onCreateNode
Called when a new node has been created.- Specified by:
onCreateNodein interfaceNodeServicePolicies.OnCreateNodePolicy- Parameters:
childAssocRef- the created child association reference
-
onUpdateProperties
public void onUpdateProperties(NodeRef nodeRef, Map<QName, Serializable> before, Map<QName, Serializable> after) Called 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
-
onAddAspect
Called after an aspect has been added to a nodeSave the node for checking of properties. The
incompleteaspect is not processed.- Specified by:
onAddAspectin interfaceNodeServicePolicies.OnAddAspectPolicy- Parameters:
nodeRef- the node to which the aspect was addedaspectTypeQName- the type of the aspect
-
onRemoveAspect
Recheck the node as an aspect was removed.- Specified by:
onRemoveAspectin interfaceNodeServicePolicies.OnRemoveAspectPolicy- Parameters:
nodeRef- the node from which the aspect will be removedaspectTypeQName- the type of the aspect
-
onCreateChildAssociation
Called after a node child association has been created.This only saves the node for checking if it is not new. The create of the node will handle it.
- Specified by:
onCreateChildAssociationin interfaceNodeServicePolicies.OnCreateChildAssociationPolicy- Parameters:
childAssocRef- the child association that has been createdisNew- true if the node is new or false if the node is being linked in
-
onDeleteChildAssociation
Called after a node child association has been deleted.- Specified by:
onDeleteChildAssociationin interfaceNodeServicePolicies.OnDeleteChildAssociationPolicy- Parameters:
childAssocRef- the child association that has been deleted
-
onCreateAssociation
Called after a regular node association is created.- Specified by:
onCreateAssociationin interfaceNodeServicePolicies.OnCreateAssociationPolicy- Parameters:
nodeAssocRef- the regular node association that was created
-
onDeleteAssociation
Called after a regular node association is deleted.- Specified by:
onDeleteAssociationin interfaceNodeServicePolicies.OnDeleteAssociationPolicy- Parameters:
nodeAssocRef- the regular node association that was removed
-
beforeCommit
public void beforeCommit(boolean readOnly) Process all the nodes that require checking within the transaction.- Specified by:
beforeCommitin interfaceorg.alfresco.util.transaction.TransactionListener- Overrides:
beforeCommitin classorg.alfresco.util.transaction.TransactionListenerAdapter
-