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 |
QNAMEARG_0, ARG_1, ARG_2, QNAMEQNAMEQNAME| 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.OnCreateNodePolicychildAssocRef - 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.OnUpdatePropertiesPolicynodeRef - 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.OnMoveNodePolicyoldChildAssocRef - ChildAssociationRefnewChildAssocRef - ChildAssociationRefpublic void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
beforeDeleteNode in interface NodeServicePolicies.BeforeDeleteNodePolicynodeRef - NodeRefpublic final void shutdownRequest()
public void afterCommit()
afterCommit in interface org.alfresco.util.transaction.TransactionListenerafterCommit in class org.alfresco.util.transaction.TransactionListenerAdapterCopyright © 2005–2018 Alfresco Software. All rights reserved.