org.modeshape.jcr.cache.change

## Interface Changes

- All Known Implementing Classes:
    NoOpChanges, RecordingChanges

      public interface Changes

  An interface used to signal various kinds of changes.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `binaryValueNoLongerUsed(BinaryKey key)` Create an event that signals that the (stored) binary value with the supplied key is no longer used.
    `void` | `nodeChanged(NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, boolean queryable)` Create an event signifying that something about the node (other than the properties or location) changed.
    `void` | `nodeCreated(NodeKey key, NodeKey parentKey, Path path, Name primaryType, Set<Name> mixinTypes, Map<Name,Property> properties, boolean queryable)` Signal that a new node was created.
    `void` | `nodeMoved(NodeKey key, Name primaryType, Set<Name> mixinTypes, NodeKey newParent, NodeKey oldParent, Path newPath, Path oldPath, boolean queryable)` 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, Name primaryType, Set<Name> mixinTypes, boolean queryable)` Signal that a node was removed.
    `void` | `nodeRenamed(NodeKey key, Path newPath, Path.Segment oldName, Name primaryType, Set<Name> mixinTypes, boolean queryable)` Signal that a node was renamed (but still has the same parent)
    `void` | `nodeReordered(NodeKey key, Name primaryType, Set<Name> mixinTypes, NodeKey parent, Path newPath, Path oldPath, Path reorderedBeforePath, boolean queryable)` Signal that a node was placed into a new location within the same parent.
    `void` | `nodeSequenced(NodeKey sequencedNodeKey, Path sequencedNodePath, Name sequencedNodePrimaryType, Set<Name> sequencedNodeMixinTypes, NodeKey outputNodeKey, Path outputNodePath, String outputPath, String userId, String selectedPath, String sequencerName, boolean queryable)` Signal that a node was successfully sequenced.
    `void` | `nodeSequencingFailure(NodeKey sequencedNodeKey, Path sequencedNodePath, Name sequencedNodePrimaryType, Set<Name> sequencedNodeMixinTypes, String outputPath, String userId, String selectedPath, String sequencerName, boolean queryable, Throwable cause)` Signal that a node was not sequenced successfully.
    `void` | `propertyAdded(NodeKey key, Name nodePrimaryType, Set<Name> nodeMixinTypes, Path nodePath, Property property, boolean queryable)` Signal that a property was added to a node.
    `void` | `propertyChanged(NodeKey key, Name nodePrimaryType, Set<Name> nodeMixinTypes, Path nodePath, Property newProperty, Property oldProperty, boolean queryable)` Signal that a property was changed on a node.
    `void` | `propertyRemoved(NodeKey key, Name nodePrimaryType, Set<Name> nodeMixinTypes, Path nodePath, Property property, boolean queryable)` Signal that a property was removed from a node.
    `void` | `repositoryMetadataChanged()` Signal that the repository metadata has changed.
    `void` | `workspaceAdded(String workspaceName)` Signal that a new workspace has been added.
    `void` | `workspaceRemoved(String workspaceName)` Signal that a new workspace has been removed.

- - ### Method Detail

    - #### workspaceAdded

          void workspaceAdded(String workspaceName)

      Signal that a new workspace has been added.
      Parameters:
        `workspaceName` - the name of the workspace; may not be null

    - #### workspaceRemoved

          void workspaceRemoved(String workspaceName)

      Signal that a new workspace has been removed.
      Parameters:
        `workspaceName` - the name of the workspace; may not be null

    - #### repositoryMetadataChanged

          void repositoryMetadataChanged()

      Signal that the repository metadata has changed.

    - #### nodeCreated

          void nodeCreated(NodeKey key,
                         NodeKey parentKey,
                         Path path,
                         Name primaryType,
                         Set<Name> mixinTypes,
                         Map<Name,Property> properties,
                         boolean queryable)

      Signal that a new node was created.
      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
        `primaryType` - the primary type of the node; may not be null
        `mixinTypes` - the mixin types of the node; may not be null
        `properties` - the properties in the new node, or null if there are none
        `queryable` - true if this node is queryable, or false otherwise

    - #### nodeRemoved

          void nodeRemoved(NodeKey key,
                         NodeKey parentKey,
                         Path path,
                         Name primaryType,
                         Set<Name> mixinTypes,
                         boolean queryable)

      Signal that a node was removed.
      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
        `primaryType` - the primary type of the node; may not be null
        `mixinTypes` - the mixin types of the node; may not be null
        `queryable` - true if this node is queryable, or false otherwise

    - #### nodeRenamed

          void nodeRenamed(NodeKey key,
                         Path newPath,
                         Path.Segment oldName,
                         Name primaryType,
                         Set<Name> mixinTypes,
                         boolean queryable)

      Signal that a node was renamed (but still has the same parent)
      Parameters:
        `key` - the key for the node; may not be null
        `newPath` - the new path for the node; may not be null
        `oldName` - the old name (including SNS index); may not be null
        `primaryType` - the primary type of the node; may not be null
        `mixinTypes` - the mixin types of the node; may not be null
        `queryable` - true if this node is queryable, or false otherwise

    - #### nodeMoved

          void nodeMoved(NodeKey key,
                       Name primaryType,
                       Set<Name> mixinTypes,
                       NodeKey newParent,
                       NodeKey oldParent,
                       Path newPath,
                       Path oldPath,
                       boolean queryable)

      Signal that a node was moved from one parent to another, and may have also been renamed.
      Parameters:
        `key` - the key for the node; may not be null
        `primaryType` - the primary type of the node; may not be null
        `mixinTypes` - the mixin types of 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
        `queryable` - true if this node is queryable, or false otherwise

    - #### nodeReordered

          void nodeReordered(NodeKey key,
                           Name primaryType,
                           Set<Name> mixinTypes,
                           NodeKey parent,
                           Path newPath,
                           Path oldPath,
                           Path reorderedBeforePath,
                           boolean queryable)

      Signal that a node was placed into a new location within the same parent.
      Parameters:
        `key` - the key for the node; may not be null
        `primaryType` - the primary type of the node; may not be null
        `mixinTypes` - the mixin types of 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 be null in the case of transient reorderings
        `reorderedBeforePath` - the path of the node before which the node was moved; or null if the node was reordered to the
        `queryable` - true if this node is queryable, or false otherwise

    - #### nodeChanged

          void nodeChanged(NodeKey key,
                         Path path,
                         Name primaryType,
                         Set<Name> mixinTypes,
                         boolean queryable)

      Create an event signifying that something about the node (other than the properties or location) changed.
      Parameters:
        `key` - the node key; may not be null
        `path` - the path
        `primaryType` - the primary type of the node; may not be null
        `mixinTypes` - the mixin types of the node; may not be null
        `queryable` - true if this node is queryable, or false otherwise

    - #### nodeSequenced

          void nodeSequenced(NodeKey sequencedNodeKey,
                           Path sequencedNodePath,
                           Name sequencedNodePrimaryType,
                           Set<Name> sequencedNodeMixinTypes,
                           NodeKey outputNodeKey,
                           Path outputNodePath,
                           String outputPath,
                           String userId,
                           String selectedPath,
                           String sequencerName,
                           boolean queryable)

      Signal that a node was successfully sequenced.
      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
        `sequencedNodePrimaryType` - the primary type of the node that was used as input and sequenced; may not be null
        `sequencedNodeMixinTypes` - the mixin types 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
        `queryable` - true if this node is queryable, or false otherwise

    - #### nodeSequencingFailure

          void nodeSequencingFailure(NodeKey sequencedNodeKey,
                                   Path sequencedNodePath,
                                   Name sequencedNodePrimaryType,
                                   Set<Name> sequencedNodeMixinTypes,
                                   String outputPath,
                                   String userId,
                                   String selectedPath,
                                   String sequencerName,
                                   boolean queryable,
                                   Throwable cause)

      Signal that a node was not sequenced successfully.
      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
        `sequencedNodePrimaryType` - the primary type of the node that was used as input and sequenced; may not be null
        `sequencedNodeMixinTypes` - the mixin types 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
        `queryable` - true if this node is queryable, or false otherwise
        `cause` - the exception that caused the failure; may not be null

    - #### propertyAdded

          void propertyAdded(NodeKey key,
                           Name nodePrimaryType,
                           Set<Name> nodeMixinTypes,
                           Path nodePath,
                           Property property,
                           boolean queryable)

      Signal that a property was added to a node.
      Parameters:
        `key` - the key of the node that was changed; may not be null
        `nodePrimaryType` - the primary type of the node; may not be null
        `nodeMixinTypes` - the mixin types of the node; 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
        `queryable` - true if this node is queryable, or false otherwise

    - #### propertyRemoved

          void propertyRemoved(NodeKey key,
                             Name nodePrimaryType,
                             Set<Name> nodeMixinTypes,
                             Path nodePath,
                             Property property,
                             boolean queryable)

      Signal that a property was removed from a node.
      Parameters:
        `key` - the key of the node that was changed; may not be null
        `nodePrimaryType` - the primary type of the node; may not be null
        `nodeMixinTypes` - the mixin types of the node; 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
        `queryable` - true if this node is queryable, or false otherwise

    - #### propertyChanged

          void propertyChanged(NodeKey key,
                             Name nodePrimaryType,
                             Set<Name> nodeMixinTypes,
                             Path nodePath,
                             Property newProperty,
                             Property oldProperty,
                             boolean queryable)

      Signal that a property was changed on a node.
      Parameters:
        `key` - the key of the node that was changed; may not be null
        `nodePrimaryType` - the primary type of the node; may not be null
        `nodeMixinTypes` - the mixin types of the node; 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
        `queryable` - true if this node is queryable, or false otherwise

    - #### binaryValueNoLongerUsed

          void binaryValueNoLongerUsed(BinaryKey key)

      Create an event that signals that the (stored) binary value with the supplied key is no longer used.
      Parameters:
        `key` - the key for the now-unused binary value; may not be null

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