org.alfresco.repo.node.integrity
Class IncompleteNodeTagger
java.lang.Object
org.alfresco.repo.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, TransactionListener
public class IncompleteNodeTagger
- extends TransactionListenerAdapter
- implements NodeServicePolicies.OnCreateNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnCreateChildAssociationPolicy, NodeServicePolicies.OnDeleteChildAssociationPolicy, NodeServicePolicies.OnCreateAssociationPolicy, NodeServicePolicies.OnDeleteAssociationPolicy
Component that tags incomplete
nodes.
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy |
Policy.Arg |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IncompleteNodeTagger
public IncompleteNodeTagger()
setPolicyComponent
public void setPolicyComponent(PolicyComponent policyComponent)
- Parameters:
policyComponent
- the component to register behaviour with
setDictionaryService
public void setDictionaryService(DictionaryService dictionaryService)
- Parameters:
dictionaryService
- the dictionary against which to confirm model details
setNodeService
public void setNodeService(NodeService nodeService)
- Parameters:
nodeService
- the node service to use for browsing node structures
setStoresToIgnore
public void setStoresToIgnore(java.util.List storesToIgnore)
- Parameters:
storesToIgnore
- stores (eg. workspace://version2Store) which will be
ignored by IncompleteNodeTagger. Note: assumes associations are within a store.
init
public void init()
- Registers the system-level policy behaviours
onCreateNode
public void onCreateNode(ChildAssociationRef childAssocRef)
- Called when a new node has been created.
- Specified by:
onCreateNode
in interface NodeServicePolicies.OnCreateNodePolicy
- Parameters:
childAssocRef
- the created child association reference
onUpdateProperties
public void onUpdateProperties(NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
- Called after a node's properties have been changed.
- Specified by:
onUpdateProperties
in interface NodeServicePolicies.OnUpdatePropertiesPolicy
- Parameters:
nodeRef
- reference to the updated nodebefore
- the node's properties before the changeafter
- the node's properties after the change
onAddAspect
public void onAddAspect(NodeRef nodeRef,
QName aspectTypeQName)
- Called after an aspect has been added to a node
Save the node for checking of properties.
The incomplete
aspect is
not processed.
- Specified by:
onAddAspect
in interface NodeServicePolicies.OnAddAspectPolicy
- Parameters:
nodeRef
- the node to which the aspect was addedaspectTypeQName
- the type of the aspect
onRemoveAspect
public void onRemoveAspect(NodeRef nodeRef,
QName aspectTypeQName)
- Recheck the node as an aspect was removed.
- Specified by:
onRemoveAspect
in interface NodeServicePolicies.OnRemoveAspectPolicy
- Parameters:
nodeRef
- the node from which the aspect will be removedaspectTypeQName
- the type of the aspect
onCreateChildAssociation
public void onCreateChildAssociation(ChildAssociationRef childAssocRef,
boolean isNew)
- 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:
onCreateChildAssociation
in interface NodeServicePolicies.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
public void onDeleteChildAssociation(ChildAssociationRef childAssocRef)
- Called after a node child association has been deleted.
- Specified by:
onDeleteChildAssociation
in interface NodeServicePolicies.OnDeleteChildAssociationPolicy
- Parameters:
childAssocRef
- the child association that has been deleted
onCreateAssociation
public void onCreateAssociation(AssociationRef nodeAssocRef)
- Called after a regular node association is created.
- Specified by:
onCreateAssociation
in interface NodeServicePolicies.OnCreateAssociationPolicy
- Parameters:
nodeAssocRef
- the regular node association that was created
onDeleteAssociation
public void onDeleteAssociation(AssociationRef nodeAssocRef)
- Called after a regular node association is deleted.
- Specified by:
onDeleteAssociation
in interface NodeServicePolicies.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:
beforeCommit
in interface TransactionListener
- Overrides:
beforeCommit
in class TransactionListenerAdapter
- Parameters:
readOnly
- true if the transaction is read-only
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.