Class NodeMonitor

    • Constructor Detail

      • NodeMonitor

        protected NodeMonitor​(ContentContext filesysCtx,
                              org.alfresco.service.cmr.repository.NodeService nodeService,
                              PolicyComponent policyComponent,
                              FileFolderService fileFolderService,
                              org.alfresco.service.cmr.security.PermissionService permissionService,
                              TransactionService transService)
        Class constructor
        Parameters:
        filesysCtx - ContentContext
        nodeService - NodeService
        policyComponent - PolicyComponent
        fileFolderService - FileFolderService
        permissionService - PermissionService
        transService - TransactionService
    • Method Detail

      • init

        public final void init()
        Initialize the node monitor
      • startMonitor

        public void startMonitor()
        Start the node monitor thread
      • onCreateNode

        public void onCreateNode​(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
        Create node event
        Specified by:
        onCreateNode in interface NodeServicePolicies.OnCreateNodePolicy
        Parameters:
        childAssocRef - ChildAssociationRef
      • onUpdateProperties

        public 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)
        Update properties event
        Specified by:
        onUpdateProperties in interface NodeServicePolicies.OnUpdatePropertiesPolicy
        Parameters:
        nodeRef - NodeRef
        before - the node's properties before the change
        after - the node's properties after the change
      • onMoveNode

        public void onMoveNode​(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef,
                               org.alfresco.service.cmr.repository.ChildAssociationRef newChildAssocRef)
        Move node event
        Specified by:
        onMoveNode in interface NodeServicePolicies.OnMoveNodePolicy
        Parameters:
        oldChildAssocRef - ChildAssociationRef
        newChildAssocRef - ChildAssociationRef
      • shutdownRequest

        public final void shutdownRequest()
        Request the node monitor thread to shut down
      • afterCommit

        public void afterCommit()
        Transaction processing hook
        Specified by:
        afterCommit in interface org.alfresco.util.transaction.TransactionListener
        Overrides:
        afterCommit in class org.alfresco.util.transaction.TransactionListenerAdapter
      • run

        public void run()
        Post Commit Event queue processing
        Specified by:
        run in interface Runnable