org.jboss.dna.repository.observation
Class NodeChange

java.lang.Object
  extended by org.jboss.dna.repository.observation.NodeChange

@Immutable
public class NodeChange
extends Object

A notification of changes to a node.

Author:
Randall Hauch

Constructor Summary
NodeChange(String repositoryWorkspaceName, String absolutePath, int eventTypes, Set<String> modifiedProperties, Set<String> removedProperties)
           
 
Method Summary
 boolean equals(Object obj)
          
 String getAbsolutePath()
           
 Set<String> getModifiedProperties()
           
 Set<String> getRemovedProperties()
           
 String getRepositoryWorkspaceName()
           
 int hashCode()
          
 boolean includesAllEventTypes(int... jcrEventTypes)
           
 boolean includesEventTypes(int... jcrEventTypes)
           
 boolean isNotOnPath(String absolutePath)
          Return whether this node change occurs on a node on a different path than that supplied.
 boolean isOnPath(String absolutePath)
          Return whether this node change occurs on a node on the supplied path.
 boolean isPropertyModified(String property)
          Determine whether this node change includes the setting of new value(s) for the supplied property.
 boolean isPropertyRemoved(String property)
          Determine whether this node change includes the removal of the supplied property.
 boolean isSameNode(NodeChange that)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeChange

public NodeChange(String repositoryWorkspaceName,
                  String absolutePath,
                  int eventTypes,
                  Set<String> modifiedProperties,
                  Set<String> removedProperties)
Method Detail

getAbsolutePath

public String getAbsolutePath()
Returns:
absolutePath

getRepositoryWorkspaceName

public String getRepositoryWorkspaceName()
Returns:
repositoryWorkspaceName

getModifiedProperties

public Set<String> getModifiedProperties()
Returns:
modifiedProperties

getRemovedProperties

public Set<String> getRemovedProperties()
Returns:
removedProperties

hashCode

public int hashCode()

Overrides:
hashCode in class Object

includesAllEventTypes

public boolean includesAllEventTypes(int... jcrEventTypes)

includesEventTypes

public boolean includesEventTypes(int... jcrEventTypes)

isSameNode

public boolean isSameNode(NodeChange that)

isOnPath

public boolean isOnPath(String absolutePath)
Return whether this node change occurs on a node on the supplied path.

Parameters:
absolutePath - the path
Returns:
true if the node is on the supplied absolute path, or false otherwise
See Also:
isNotOnPath(String)

isNotOnPath

public boolean isNotOnPath(String absolutePath)
Return whether this node change occurs on a node on a different path than that supplied.

Parameters:
absolutePath - the path
Returns:
true if the node is on a different path, or false if it is on the same path
See Also:
isOnPath(String)

isPropertyModified

public boolean isPropertyModified(String property)
Determine whether this node change includes the setting of new value(s) for the supplied property.

Parameters:
property - the name of the property
Returns:
true if the named property has a new value on this node, or false otherwise

isPropertyRemoved

public boolean isPropertyRemoved(String property)
Determine whether this node change includes the removal of the supplied property.

Parameters:
property - the name of the property
Returns:
true if the named property was removed from this node, or false otherwise

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.