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
incomplete
nodes.Policy.Arg
QNAME
ARG_0, ARG_1, ARG_2, QNAME
QNAME
QNAME
QNAME
QNAME
QNAME
QNAME
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,
Map<org.alfresco.service.namespace.QName,Serializable> before,
Map<org.alfresco.service.namespace.QName,Serializable> after)
Called after a node's properties have been changed.
|
void |
setBehaviourFilter(BehaviourFilter behaviourFilter) |
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
void |
setPropertiesToIgnore(List<String> propertiesToIgnore) |
void |
setStoresToIgnore(List<String> storesToIgnore) |
public 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(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(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
onCreateNode
in interface NodeServicePolicies.OnCreateNodePolicy
childAssocRef
- the created child association referencepublic void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, Map<org.alfresco.service.namespace.QName,Serializable> before, Map<org.alfresco.service.namespace.QName,Serializable> after)
onUpdateProperties
in interface NodeServicePolicies.OnUpdatePropertiesPolicy
nodeRef
- 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.OnAddAspectPolicy
nodeRef
- 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.OnRemoveAspectPolicy
nodeRef
- 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.OnCreateChildAssociationPolicy
childAssocRef
- 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.OnDeleteChildAssociationPolicy
childAssocRef
- the child association that has been deletedpublic void onCreateAssociation(org.alfresco.service.cmr.repository.AssociationRef nodeAssocRef)
onCreateAssociation
in interface NodeServicePolicies.OnCreateAssociationPolicy
nodeAssocRef
- the regular node association that was createdpublic void onDeleteAssociation(org.alfresco.service.cmr.repository.AssociationRef nodeAssocRef)
onDeleteAssociation
in interface NodeServicePolicies.OnDeleteAssociationPolicy
nodeAssocRef
- the regular node association that was removedpublic void beforeCommit(boolean readOnly)
beforeCommit
in interface org.alfresco.util.transaction.TransactionListener
beforeCommit
in class org.alfresco.util.transaction.TransactionListenerAdapter
Copyright © 2005–2017 Alfresco Software. All rights reserved.