Class IncompleteNodeTagger

    • Constructor Detail

      • IncompleteNodeTagger

        public IncompleteNodeTagger()
    • Method Detail

      • setPolicyComponent

        public void setPolicyComponent​(PolicyComponent policyComponent)
        Parameters:
        policyComponent - the component to register behaviour with
      • setDictionaryService

        public void setDictionaryService​(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
        Parameters:
        dictionaryService - the dictionary against which to confirm model details
      • setNodeService

        public void setNodeService​(org.alfresco.service.cmr.repository.NodeService nodeService)
        Parameters:
        nodeService - the node service to use for browsing node structures
      • setStoresToIgnore

        public void setStoresToIgnore​(java.util.List<java.lang.String> storesToIgnore)
        Parameters:
        storesToIgnore - stores (eg. workspace://version2Store) which will be ignored by IncompleteNodeTagger. Note: assumes associations are within a store.
      • setPropertiesToIgnore

        public void setPropertiesToIgnore​(java.util.List<java.lang.String> propertiesToIgnore)
        Parameters:
        propertiesToIgnore - a list of property fully-qualified names to ignore
      • setBehaviourFilter

        public void setBehaviourFilter​(BehaviourFilter behaviourFilter)
      • init

        public void init()
        Registers the system-level policy behaviours
      • onCreateNode

        public void onCreateNode​(org.alfresco.service.cmr.repository.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​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                       java.util.Map<org.alfresco.service.namespace.QName,​java.io.Serializable> before,
                                       java.util.Map<org.alfresco.service.namespace.QName,​java.io.Serializable> after)
        Called after a node's properties have been changed.
        Specified by:
        onUpdateProperties in interface NodeServicePolicies.OnUpdatePropertiesPolicy
        Parameters:
        nodeRef - reference to the updated node
        before - the node's properties before the change
        after - the node's properties after the change
      • onAddAspect

        public 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

        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 added
        aspectTypeQName - the type of the aspect
      • onRemoveAspect

        public void onRemoveAspect​(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                                   org.alfresco.service.namespace.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 removed
        aspectTypeQName - the type of the aspect
      • onCreateChildAssociation

        public void onCreateChildAssociation​(org.alfresco.service.cmr.repository.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 created
        isNew - true if the node is new or false if the node is being linked in
      • onDeleteChildAssociation

        public void onDeleteChildAssociation​(org.alfresco.service.cmr.repository.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​(org.alfresco.service.cmr.repository.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​(org.alfresco.service.cmr.repository.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 org.alfresco.util.transaction.TransactionListener
        Overrides:
        beforeCommit in class org.alfresco.util.transaction.TransactionListenerAdapter