public class NodeMonitor extends org.alfresco.util.transaction.TransactionListenerAdapter implements NodeServicePolicies.OnCreateNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnMoveNodePolicy, Runnable
Monitor node events from the node service to update the file state cache and feed notification events into the file server change notification handler.
Policy.Arg
Modifier and Type | Field and Description |
---|---|
static String |
FileSysNodeEvent |
static String |
FileSysNodeEvent2 |
QNAME
ARG_0, ARG_1, ARG_2, QNAME
QNAME
QNAME
Modifier | Constructor and Description |
---|---|
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
|
Modifier and Type | Method and Description |
---|---|
void |
afterCommit()
Transaction processing hook
|
void |
beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Before delete node event
|
void |
init()
Initialize the node monitor
|
void |
onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
Create node event
|
void |
onMoveNode(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef,
org.alfresco.service.cmr.repository.ChildAssociationRef newChildAssocRef)
Move node event
|
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
|
void |
run()
Post Commit Event queue processing
|
void |
shutdownRequest()
Request the node monitor thread to shut down
|
void |
startMonitor()
Start the node monitor thread
|
public static final String FileSysNodeEvent
public static final String FileSysNodeEvent2
protected NodeMonitor(ContentContext filesysCtx, org.alfresco.service.cmr.repository.NodeService nodeService, PolicyComponent policyComponent, FileFolderService fileFolderService, org.alfresco.service.cmr.security.PermissionService permissionService, TransactionService transService)
filesysCtx
- ContentContextnodeService
- NodeServicepolicyComponent
- PolicyComponentfileFolderService
- FileFolderServicepermissionService
- PermissionServicetransService
- TransactionServicepublic final void init()
public void startMonitor()
public void onCreateNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
onCreateNode
in interface NodeServicePolicies.OnCreateNodePolicy
childAssocRef
- ChildAssociationRefpublic 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
- NodeRefbefore
- the node's properties before the changeafter
- the node's properties after the changepublic void onMoveNode(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef, org.alfresco.service.cmr.repository.ChildAssociationRef newChildAssocRef)
onMoveNode
in interface NodeServicePolicies.OnMoveNodePolicy
oldChildAssocRef
- ChildAssociationRefnewChildAssocRef
- ChildAssociationRefpublic void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
beforeDeleteNode
in interface NodeServicePolicies.BeforeDeleteNodePolicy
nodeRef
- NodeRefpublic final void shutdownRequest()
public void afterCommit()
afterCommit
in interface org.alfresco.util.transaction.TransactionListener
afterCommit
in class org.alfresco.util.transaction.TransactionListenerAdapter
Copyright © 2005–2017 Alfresco Software. All rights reserved.