ModeShape Distribution 3.2.0.Final

org.modeshape.jcr.cache.change
Class NoOpChanges

java.lang.Object
  extended by org.modeshape.jcr.cache.change.NoOpChanges
All Implemented Interfaces:
Changes

@Immutable
public final class NoOpChanges
extends Object
implements Changes

An immutable Changes implementation that does nothing.


Field Summary
static NoOpChanges INSTANCE
           
 
Method Summary
 void binaryValueNoLongerUsed(BinaryKey key)
          Create an event that signals that the (stored) binary value with the supplied key is no longer used.
 void binaryValueNowUsed(BinaryKey key)
          Create an event that signals that the (stored) binary value with the supplied key is now used.
 void nodeChanged(NodeKey key, Path path)
          Create an event signifying that something about the node (other than the properties or location) changed.
 void nodeCreated(NodeKey key, NodeKey parentKey, Path path, Map<Name,Property> properties)
          Signal that a new node was created.
 void nodeMoved(NodeKey key, NodeKey newParent, NodeKey oldParent, Path newPath, Path oldPath)
          Signal that a node was moved from one parent to another, and may have also been renamed.
 void nodeRemoved(NodeKey key, NodeKey parentKey, Path path)
          Signal that a node was removed.
 void nodeRenamed(NodeKey key, Path path, Path.Segment oldName)
          Signal that a node was renamed (but still has the same parent)
 void nodeReordered(NodeKey key, NodeKey parent, Path newPath, Path oldPath, Path reorderedBeforePath)
          Signal that a node was placed into a new location within the same parent.
 void nodeSequenced(NodeKey sequencedNodeKey, Path sequencedNodePath, NodeKey outputNodeKey, Path outputNodePath, String outputPath, String userId, String selectedPath, String sequencerName)
          Signal that a node was successfully sequenced.
 void nodeSequencingFailure(NodeKey sequencedNodeKey, Path sequencedNodePath, String outputPath, String userId, String selectedPath, String sequencerName, Throwable cause)
          Signal that a node was not sequenced successfully.
 void propertyAdded(NodeKey key, Path nodePath, Property property)
          Signal that a property was added to a node.
 void propertyChanged(NodeKey key, Path nodePath, Property newProperty, Property oldProperty)
          Signal that a property was changed on a node.
 void propertyRemoved(NodeKey key, Path nodePath, Property property)
          Signal that a property was removed from a node.
 void workspaceAdded(String workspaceName)
          Signal that a new workspace has been added.
 void workspaceRemoved(String workspaceName)
          Signal that a new workspace has been removed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final NoOpChanges INSTANCE
Method Detail

workspaceAdded

public void workspaceAdded(String workspaceName)
Description copied from interface: Changes
Signal that a new workspace has been added.

Specified by:
workspaceAdded in interface Changes
Parameters:
workspaceName - the name of the workspace; may not be null

workspaceRemoved

public void workspaceRemoved(String workspaceName)
Description copied from interface: Changes
Signal that a new workspace has been removed.

Specified by:
workspaceRemoved in interface Changes
Parameters:
workspaceName - the name of the workspace; may not be null

nodeCreated

public void nodeCreated(NodeKey key,
                        NodeKey parentKey,
                        Path path,
                        Map<Name,Property> properties)
Description copied from interface: Changes
Signal that a new node was created.

Specified by:
nodeCreated in interface Changes
Parameters:
key - the key for the new node; may not be null
parentKey - the key for the parent of the new node; may not be null
path - the path to the new node; may not be null
properties - the properties in the new node, or null if there are none

nodeMoved

public void nodeMoved(NodeKey key,
                      NodeKey newParent,
                      NodeKey oldParent,
                      Path newPath,
                      Path oldPath)
Description copied from interface: Changes
Signal that a node was moved from one parent to another, and may have also been renamed.

Specified by:
nodeMoved in interface Changes
Parameters:
key - the key for the node; may not be null
newParent - the new parent for the node; may not be null
oldParent - the old parent for the node; may not be null
newPath - the new path for the node after it has been moved; may not be null
oldPath - the old path for the node before it was moved; may not be null

nodeChanged

public void nodeChanged(NodeKey key,
                        Path path)
Description copied from interface: Changes
Create an event signifying that something about the node (other than the properties or location) changed.

Specified by:
nodeChanged in interface Changes
Parameters:
key - the node key; may not be null
path - the path

nodeRemoved

public void nodeRemoved(NodeKey key,
                        NodeKey parentKey,
                        Path path)
Description copied from interface: Changes
Signal that a node was removed.

Specified by:
nodeRemoved in interface Changes
Parameters:
key - the key for the removed node; may not be null
parentKey - the key for the old parent of the removed node; may not be null
path - the path to the removed node; may not be null

nodeRenamed

public void nodeRenamed(NodeKey key,
                        Path path,
                        Path.Segment oldName)
Description copied from interface: Changes
Signal that a node was renamed (but still has the same parent)

Specified by:
nodeRenamed in interface Changes
Parameters:
key - the key for the node; may not be null
path - the new path for the node; may not be null
oldName - the old name (including SNS index); may not be null

propertyAdded

public void propertyAdded(NodeKey key,
                          Path nodePath,
                          Property property)
Description copied from interface: Changes
Signal that a property was added to a node.

Specified by:
propertyAdded in interface Changes
Parameters:
key - the key of the node that was changed; may not be null
nodePath - the path of the node that was changed
property - the new property, with name and value(s); may not be null

propertyRemoved

public void propertyRemoved(NodeKey key,
                            Path nodePath,
                            Property property)
Description copied from interface: Changes
Signal that a property was removed from a node.

Specified by:
propertyRemoved in interface Changes
Parameters:
key - the key of the node that was changed; may not be null
nodePath - the path of the node that was changed
property - the property that was removed, with name and value(s); may not be null

propertyChanged

public void propertyChanged(NodeKey key,
                            Path nodePath,
                            Property newProperty,
                            Property oldProperty)
Description copied from interface: Changes
Signal that a property was changed on a node.

Specified by:
propertyChanged in interface Changes
Parameters:
key - the key of the node that was changed; may not be null
nodePath - the path of the node that was changed
newProperty - the new property, with name and value(s); may not be null
oldProperty - the old property, with name and value(s); may not be null

binaryValueNoLongerUsed

public void binaryValueNoLongerUsed(BinaryKey key)
Description copied from interface: Changes
Create an event that signals that the (stored) binary value with the supplied key is no longer used.

Specified by:
binaryValueNoLongerUsed in interface Changes
Parameters:
key - the key for the now-unused binary value; may not be null

binaryValueNowUsed

public void binaryValueNowUsed(BinaryKey key)
Description copied from interface: Changes
Create an event that signals that the (stored) binary value with the supplied key is now used.

Specified by:
binaryValueNowUsed in interface Changes
Parameters:
key - the key for the now-used binary value; may not be null

nodeReordered

public void nodeReordered(NodeKey key,
                          NodeKey parent,
                          Path newPath,
                          Path oldPath,
                          Path reorderedBeforePath)
Description copied from interface: Changes
Signal that a node was placed into a new location within the same parent.

Specified by:
nodeReordered in interface Changes
Parameters:
key - the key for the node; may not be null
parent - the key for the parent of the node; may not be null
newPath - the new path for the node after it has been reordered; may not be null
oldPath - the old path for the node before it was reordered; may not be null
reorderedBeforePath - the path of the node before which the node was moved; or null if the node was reordered to the end of the list of children of the parent node

nodeSequenced

public void nodeSequenced(NodeKey sequencedNodeKey,
                          Path sequencedNodePath,
                          NodeKey outputNodeKey,
                          Path outputNodePath,
                          String outputPath,
                          String userId,
                          String selectedPath,
                          String sequencerName)
Description copied from interface: Changes
Signal that a node was successfully sequenced.

Specified by:
nodeSequenced in interface Changes
Parameters:
sequencedNodeKey - the key of the node that was used as input and sequenced; may not be null
sequencedNodePath - the path of the node that was used as input and sequenced; may not be null
outputNodeKey - the key of the top-level node output by the sequencing operation; may not be null
outputNodePath - the path of the top-level node output by the sequencing operation; may not be null
outputPath - the string representation of the output path of the sequencing operation
userId - the username of the session that generated the change that led to the sequencing operation
selectedPath - the string representation of the path that led to the sequencing operation (which may or may not be the same as the sequenced node path); may not be null
sequencerName - the name of the sequencer; may not be null

nodeSequencingFailure

public void nodeSequencingFailure(NodeKey sequencedNodeKey,
                                  Path sequencedNodePath,
                                  String outputPath,
                                  String userId,
                                  String selectedPath,
                                  String sequencerName,
                                  Throwable cause)
Description copied from interface: Changes
Signal that a node was not sequenced successfully.

Specified by:
nodeSequencingFailure in interface Changes
Parameters:
sequencedNodeKey - the key of the node that was used as input and sequenced; may not be null
sequencedNodePath - the path of the node that was used as input and sequenced; may not be null
outputPath - the string representation of the output path of the sequencing operation
userId - the username of the session that generated the change that led to the (failed) sequencing operation
selectedPath - the string representation of the path that led to the (failed) sequencing operation (which may or may not be the same as the sequenced node path); may not be null
sequencerName - the name of the sequencer; may not be null
cause - the exception that caused the failure; may not be null

ModeShape Distribution 3.2.0.Final

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