org.alfresco.filesys
Class NfsServerNodeMonitor

java.lang.Object
  extended by org.alfresco.filesys.NfsServerNodeMonitor
All Implemented Interfaces:
NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnCreateChildAssociationPolicy, NodeServicePolicies.OnDeleteChildAssociationPolicy, NodeServicePolicies.OnDeleteNodePolicy, NodeServicePolicies.OnUpdatePropertiesPolicy, AssociationPolicy, ClassPolicy, Policy, org.springframework.beans.factory.InitializingBean

public class NfsServerNodeMonitor
extends java.lang.Object
implements NodeServicePolicies.OnUpdatePropertiesPolicy, NodeServicePolicies.BeforeDeleteNodePolicy, NodeServicePolicies.OnCreateChildAssociationPolicy, NodeServicePolicies.OnDeleteChildAssociationPolicy, NodeServicePolicies.OnDeleteNodePolicy, org.springframework.beans.factory.InitializingBean

Node monitor for NFS server which updates NFS cache on renaming or deleting nodes not through NFS protocol. This monitor may be dynamically enabled or disabled. It handles nodes for ${filesystem.name} device name


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.alfresco.repo.policy.Policy
Policy.Arg
 
Field Summary
static char NIX_SEPARATOR
           
static java.lang.String NIX_SEPARATOR_STR
           
 
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnUpdatePropertiesPolicy
ARG_0, ARG_1, ARG_2, QNAME
 
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.BeforeDeleteNodePolicy
QNAME
 
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnCreateChildAssociationPolicy
QNAME
 
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnDeleteChildAssociationPolicy
QNAME
 
Fields inherited from interface org.alfresco.repo.node.NodeServicePolicies.OnDeleteNodePolicy
QNAME
 
Fields inherited from interface org.alfresco.repo.policy.Policy
NAMESPACE
 
Constructor Summary
NfsServerNodeMonitor()
           
 
Method Summary
 void afterPropertiesSet()
           
 void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
          Called before a node is deleted.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getTargetDeviceName()
           
 org.alfresco.service.cmr.repository.StoreRef getTargetStoreRef()
           
 int hashCode()
           
 java.lang.Boolean isEnabled()
           
 void onCreateChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef, boolean isNewNode)
          Called after a node child association has been created.
 void onDeleteChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef)
          Called after a node child association has been deleted.
 void onDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef, boolean isNodeArchived)
          Called after a node is deleted.
 void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef, java.util.Map before, java.util.Map after)
          Called after a node's properties have been changed.
 void setEnabled(boolean enabled)
          Enables or disables policy handlers
 void setFilesystemContexts(java.util.List filesystemContexts)
           
 void setNfsServer(org.alfresco.jlan.oncrpc.nfs.NFSServer nfsServer)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
           
 void setPolicyComponent(PolicyComponent policyComponent)
           
 void setTargetDeviceName(java.lang.String targetDeviceName)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NIX_SEPARATOR

public static final char NIX_SEPARATOR
See Also:
Constant Field Values

NIX_SEPARATOR_STR

public static final java.lang.String NIX_SEPARATOR_STR
See Also:
Constant Field Values
Constructor Detail

NfsServerNodeMonitor

public NfsServerNodeMonitor()
Method Detail

setEnabled

public void setEnabled(boolean enabled)
Enables or disables policy handlers

Parameters:
enabled - Boolean value which determines working state of the handler

isEnabled

public java.lang.Boolean isEnabled()

setTargetDeviceName

public void setTargetDeviceName(java.lang.String targetDeviceName)

getTargetDeviceName

public java.lang.String getTargetDeviceName()

setFilesystemContexts

public void setFilesystemContexts(java.util.List filesystemContexts)

getTargetStoreRef

public org.alfresco.service.cmr.repository.StoreRef getTargetStoreRef()

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)

setPolicyComponent

public void setPolicyComponent(PolicyComponent policyComponent)

setPermissionService

public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)

setNfsServer

public void setNfsServer(org.alfresco.jlan.oncrpc.nfs.NFSServer nfsServer)

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
java.lang.Exception

onUpdateProperties

public void onUpdateProperties(org.alfresco.service.cmr.repository.NodeRef nodeRef,
                               java.util.Map before,
                               java.util.Map after)
Description copied from interface: NodeServicePolicies.OnUpdatePropertiesPolicy
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

beforeDeleteNode

public void beforeDeleteNode(org.alfresco.service.cmr.repository.NodeRef nodeRef)
Description copied from interface: NodeServicePolicies.BeforeDeleteNodePolicy
Called before a node is deleted.

Specified by:
beforeDeleteNode in interface NodeServicePolicies.BeforeDeleteNodePolicy
Parameters:
nodeRef - the node reference

onDeleteNode

public void onDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef,
                         boolean isNodeArchived)
Description copied from interface: NodeServicePolicies.OnDeleteNodePolicy
Called after a node is deleted. The reference given is for an association which has been deleted and cannot be used to retrieve node or associaton information from any of the services.

Specified by:
onDeleteNode in interface NodeServicePolicies.OnDeleteNodePolicy
Parameters:
childAssocRef - the primary parent-child association of the deleted node
isNodeArchived - indicates whether the node has been archived rather than purged

onCreateChildAssociation

public void onCreateChildAssociation(org.alfresco.service.cmr.repository.ChildAssociationRef childAssocRef,
                                     boolean isNewNode)
Description copied from interface: NodeServicePolicies.OnCreateChildAssociationPolicy
Called after a node child association has been created.

Specified by:
onCreateChildAssociation in interface NodeServicePolicies.OnCreateChildAssociationPolicy
Parameters:
childAssocRef - the child association that has been created
isNewNode - 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)
Description copied from interface: NodeServicePolicies.OnDeleteChildAssociationPolicy
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

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.