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(NodeRef nodeRef,
QName aspectTypeQName)
Called after an aspect has been added to a node
|
void |
onCreateAssociation(AssociationRef nodeAssocRef)
Called after a regular node association is created.
|
void |
onCreateChildAssociation(ChildAssociationRef childAssocRef,
boolean isNew)
Called after a node child association has been created.
|
void |
onCreateNode(ChildAssociationRef childAssocRef)
Called when a new node has been created.
|
void |
onDeleteAssociation(AssociationRef nodeAssocRef)
Called after a regular node association is deleted.
|
void |
onDeleteChildAssociation(ChildAssociationRef childAssocRef)
Called after a node child association has been deleted.
|
void |
onRemoveAspect(NodeRef nodeRef,
QName aspectTypeQName)
Recheck the node as an aspect was removed.
|
void |
onUpdateProperties(NodeRef nodeRef,
Map<QName,Serializable> before,
Map<QName,Serializable> after)
Called after a node's properties have been changed.
|
void |
setBehaviourFilter(BehaviourFilter behaviourFilter) |
void |
setDictionaryService(DictionaryService dictionaryService) |
void |
setNodeService(NodeService nodeService) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setPropertiesToIgnore(List<String> propertiesToIgnore) |
void |
setStoresToIgnore(List<String> storesToIgnore) |
afterCommit, afterRollback, beforeCompletionpublic void setPolicyComponent(PolicyComponent policyComponent)
policyComponent - the component to register behaviour withpublic void setDictionaryService(DictionaryService dictionaryService)
dictionaryService - the dictionary against which to confirm model detailspublic void setNodeService(NodeService nodeService)
nodeService - the node service to use for browsing node structurespublic void setStoresToIgnore(List<String> storesToIgnore)
storesToIgnore - stores (eg. workspace://version2Store) which will be
ignored by IncompleteNodeTagger. Note: assumes associations are within a store.public void setPropertiesToIgnore(List<String> propertiesToIgnore)
propertiesToIgnore - a list of property fully-qualified names to ignorepublic void setBehaviourFilter(BehaviourFilter behaviourFilter)
public void init()
public void onCreateNode(ChildAssociationRef childAssocRef)
onCreateNode in interface NodeServicePolicies.OnCreateNodePolicychildAssocRef - the created child association referencepublic void onUpdateProperties(NodeRef nodeRef, Map<QName,Serializable> before, Map<QName,Serializable> 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(NodeRef nodeRef, 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(NodeRef nodeRef, QName aspectTypeQName)
onRemoveAspect in interface NodeServicePolicies.OnRemoveAspectPolicynodeRef - the node from which the aspect will be removedaspectTypeQName - the type of the aspectpublic void onCreateChildAssociation(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(ChildAssociationRef childAssocRef)
onDeleteChildAssociation in interface NodeServicePolicies.OnDeleteChildAssociationPolicychildAssocRef - the child association that has been deletedpublic void onCreateAssociation(AssociationRef nodeAssocRef)
onCreateAssociation in interface NodeServicePolicies.OnCreateAssociationPolicynodeAssocRef - the regular node association that was createdpublic void onDeleteAssociation(AssociationRef nodeAssocRef)
onDeleteAssociation in interface NodeServicePolicies.OnDeleteAssociationPolicynodeAssocRef - the regular node association that was removedpublic void beforeCommit(boolean readOnly)
beforeCommit in interface TransactionListenerbeforeCommit in class TransactionListenerAdapterCopyright © 2005–2020 Alfresco Software. All rights reserved.