org.modeshape.graph.observe
Class NetChangeObserver.NetChange

java.lang.Object
  extended by org.modeshape.graph.observe.NetChangeObserver.NetChange
Enclosing class:
NetChangeObserver

@Immutable
public static final class NetChangeObserver.NetChange
extends Object

A notification of changes to a node.


Constructor Summary
NetChangeObserver.NetChange(String workspaceName, Location location, EnumSet<NetChangeObserver.ChangeType> eventTypes, Set<Property> addedProperties, Set<Property> modifiedProperties, Set<Name> removedProperties)
           
 
Method Summary
 boolean equals(Object obj)
          
 Set<Property> getAddedOrModifiedProperties()
          Get the combination of added and modified properties.
 Set<Property> getAddedProperties()
           
 Location getLocation()
           
 Set<Property> getModifiedProperties()
           
 Path getPath()
           
 Set<Name> getRemovedProperties()
           
 String getRepositoryWorkspaceName()
           
 int hashCode()
          
 boolean includes(NetChangeObserver.ChangeType... jcrEventTypes)
          Determine whether this net change includes any of the supplied types.
 boolean includesAllOf(NetChangeObserver.ChangeType... jcrEventTypes)
          Determine whether this net change includes all of the supplied types.
 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(NetChangeObserver.NetChange that)
           
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NetChangeObserver.NetChange

public NetChangeObserver.NetChange(String workspaceName,
                                   Location location,
                                   EnumSet<NetChangeObserver.ChangeType> eventTypes,
                                   Set<Property> addedProperties,
                                   Set<Property> modifiedProperties,
                                   Set<Name> removedProperties)
Method Detail

getLocation

public Location getLocation()
Returns:
the node location

getPath

public Path getPath()
Returns:
absolutePath

getRepositoryWorkspaceName

public String getRepositoryWorkspaceName()
Returns:
repositoryWorkspaceName

getAddedProperties

public Set<Property> getAddedProperties()
Returns:
the added properties

getModifiedProperties

public Set<Property> getModifiedProperties()
Returns:
modifiedProperties

getAddedOrModifiedProperties

public Set<Property> getAddedOrModifiedProperties()
Get the combination of added and modified properties.

Returns:
the immutable set of properties that were added or modified; never null but possibly empty

getRemovedProperties

public Set<Name> getRemovedProperties()
Returns:
removedProperties

hashCode

public int hashCode()

Overrides:
hashCode in class Object

includesAllOf

public boolean includesAllOf(NetChangeObserver.ChangeType... jcrEventTypes)
Determine whether this net change includes all of the supplied types.

Parameters:
jcrEventTypes - the types to check for
Returns:
true if all of the supplied events are included in this net change, or false otherwise

includes

public boolean includes(NetChangeObserver.ChangeType... jcrEventTypes)
Determine whether this net change includes any of the supplied types.

Parameters:
jcrEventTypes - the types to check for
Returns:
true if any of the supplied events are included in this net change, or false otherwise

isSameNode

public boolean isSameNode(NetChangeObserver.NetChange that)

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-2010 JBoss, a division of Red Hat. All Rights Reserved.