public class IncompleteNodeTagger extends TransactionListenerAdapter implements NodeServicePolicies.OnCreateNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, NodeServicePolicies.OnAddAspectPolicy, NodeServicePolicies.OnRemoveAspectPolicy, NodeServicePolicies.OnCreateChildAssociationPolicy, NodeServicePolicies.OnDeleteChildAssociationPolicy, NodeServicePolicies.OnCreateAssociationPolicy, NodeServicePolicies.OnDeleteAssociationPolicy
incomplete nodes.Policy.ArgQNAMEARG_0, ARG_1, ARG_2, QNAMEQNAMEQNAMEQNAMEQNAMEQNAMEQNAME| Constructor and Description |
|---|
IncompleteNodeTagger() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeCommit(boolean readOnly)
Process all the nodes that require checking within the transaction.
|
void |
init()
Registers the system-level policy behaviours
|
void |
onAddAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName)
Called after an aspect has been added to a node
|
void |
onCreateAssociation(org.alfresco.service.cmr.repository.AssociationRef nodeAssocRef)
Called after a regular node association is created.
|
void |
onCreateChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef,
boolean isNew)
Called after a node child association has been created.
|
void |
onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
Called when a new node has been created.
|
void |
onDeleteAssociation(org.alfresco.service.cmr.repository.AssociationRef nodeAssocRef)
Called after a regular node association is deleted.
|
void |
onDeleteChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
Called after a node child association has been deleted.
|
void |
onRemoveAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName)
Recheck the node as an aspect was removed.
|
void |
onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
Called after a node's properties have been changed.
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setPropertiesToIgnore(java.util.List propertiesToIgnore) |
void |
setStoresToIgnore(java.util.List storesToIgnore) |
afterCommit, afterRollback, beforeCompletion, flushpublic void setPolicyComponent(PolicyComponent policyComponent)
policyComponent - the component to register behaviour withpublic void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
dictionaryService - the dictionary against which to confirm model detailspublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService - the node service to use for browsing node structurespublic void setStoresToIgnore(java.util.List storesToIgnore)
storesToIgnore - stores (eg. workspace://version2Store) which will be
ignored by IncompleteNodeTagger. Note: assumes associations are within a store.public void setPropertiesToIgnore(java.util.List propertiesToIgnore)
propertiesToIgnore - a list of property fully-qualified names to ignorepublic void init()
public void onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
onCreateNode in interface NodeServicePolicies.OnCreateNodePolicychildAssocRef - the created child association referencepublic void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
java.util.Map before,
java.util.Map after)
onUpdateProperties in interface NodeServicePolicies.OnUpdatePropertiesPolicynodeRef - reference to the updated nodebefore - the node's properties before the changeafter - the node's properties after the changepublic void onAddAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName)
Save the node for checking of properties.
The incomplete aspect is
not processed.
onAddAspect in interface NodeServicePolicies.OnAddAspectPolicynodeRef - the node to which the aspect was addedaspectTypeQName - the type of the aspectpublic void onRemoveAspect(org.alfresco.service.cmr.repository.NodeRef nodeRef,
org.alfresco.service.namespace.QName aspectTypeQName)
onRemoveAspect in interface NodeServicePolicies.OnRemoveAspectPolicynodeRef - the node from which the aspect will be removedaspectTypeQName - the type of the aspectpublic void onCreateChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef,
boolean isNew)
This only saves the node for checking if it is not new. The create of the node will handle it.
onCreateChildAssociation in interface NodeServicePolicies.OnCreateChildAssociationPolicychildAssocRef - the child association that has been createdisNew - true if the node is new or false if the node is being linked inpublic void onDeleteChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
onDeleteChildAssociation in interface NodeServicePolicies.OnDeleteChildAssociationPolicychildAssocRef - the child association that has been deletedpublic void onCreateAssociation(org.alfresco.service.cmr.repository.AssociationRef nodeAssocRef)
onCreateAssociation in interface NodeServicePolicies.OnCreateAssociationPolicynodeAssocRef - the regular node association that was createdpublic void onDeleteAssociation(org.alfresco.service.cmr.repository.AssociationRef nodeAssocRef)
onDeleteAssociation in interface NodeServicePolicies.OnDeleteAssociationPolicynodeAssocRef - the regular node association that was removedpublic void beforeCommit(boolean readOnly)
beforeCommit in interface TransactionListenerbeforeCommit in class TransactionListenerAdapterreadOnly - true if the transaction is read-onlyCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.