org.modeshape.jcr.federation

## Class ConnectorChangeSetImpl

- java.lang.Object
- - org.modeshape.jcr.federation.ConnectorChangeSetImpl

- All Implemented Interfaces:
    ConnectorChangeSet

      @NotThreadSafe
      public class ConnectorChangeSetImpl
      extends Object
      implements ConnectorChangeSet

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConnectorChangeSetImpl(Connectors connectors, Connectors.PathMappings mappings, String processId, String repositoryKey, ChangeBus bus, DateTimeFactory timeFactory, String journalId)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected RecordingChanges` | `changesFor(String workspaceName)`
    `protected RecordingChanges` | `changesFor(WorkspaceAndPath workspaceAndPath)`
    `void` | `nodeCreated(String docId, String parentDocId, String path, Name primaryType, Set<Name> mixinTypes, Map<Name,Property> properties)` Signal that a new node resource was created.
    `void` | `nodeMoved(String docId, Name primaryType, Set<Name> mixinTypes, String newParentDocId, String oldParentDocId, String newPath, String oldPath)` Signal that a node resource (and all descendants) was moved from one parent to another.
    `void` | `nodeRemoved(String docId, String parentDocId, String path, Name primaryType, Set<Name> mixinTypes)` Signal that a node resource (and all descendants) was removed.
    `void` | `nodeReordered(String docId, Name primaryType, Set<Name> mixinTypes, String parentDocId, String newPath, String oldNameSegment, String reorderedBeforeNameSegment)` Signal that a node resource (and all descendants) was placed into a new location within the same parent.
    `void` | `propertyAdded(String docId, Name nodePrimaryType, Set<Name> nodeMixinTypes, String nodePath, Property property)` Signal that a property was added to a node resource.
    `void` | `propertyChanged(String docId, Name nodePrimaryType, Set<Name> nodeMixinTypes, String nodePath, Property oldProperty, Property newProperty)` Signal that a property resource was changed on a node resource.
    `void` | `propertyRemoved(String docId, Name nodePrimaryType, Set<Name> nodeMixinTypes, String nodePath, Property property)` Signal that a property was removed from a node resource.
    `void` | `publish(Map<String,String> data)` Finish the construction of this change-set and make it available for publication into the repository.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ConnectorChangeSetImpl

          public ConnectorChangeSetImpl(Connectors connectors,
                                Connectors.PathMappings mappings,
                                String processId,
                                String repositoryKey,
                                ChangeBus bus,
                                DateTimeFactory timeFactory,
                                String journalId)

  - ### Method Detail

    - #### changesFor

          protected final RecordingChanges changesFor(WorkspaceAndPath workspaceAndPath)

    - #### changesFor

          protected final RecordingChanges changesFor(String workspaceName)

    - #### nodeCreated

          public void nodeCreated(String docId,
                         String parentDocId,
                         String path,
                         Name primaryType,
                         Set<Name> mixinTypes,
                         Map<Name,Property> properties)

      Description copied from interface: `ConnectorChangeSet`
      Signal that a new node resource was created.
      Specified by:
        `nodeCreated` in interface `ConnectorChangeSet`
      Parameters:
        `docId` - the connector's identifier for the new node; may not be null
        `parentDocId` - the connector's identifier 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

    - #### nodeRemoved

          public void nodeRemoved(String docId,
                         String parentDocId,
                         String path,
                         Name primaryType,
                         Set<Name> mixinTypes)

      Description copied from interface: `ConnectorChangeSet`
      Signal that a node resource (and all descendants) was removed. Note that it is not common to fire an event for all nodes below a node that is also deleted within the same change set.
      Specified by:
        `nodeRemoved` in interface `ConnectorChangeSet`
      Parameters:
        `docId` - the connector's identifier for the removed node; may not be null
        `parentDocId` - the connector's identifier for the 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

    - #### nodeMoved

          public void nodeMoved(String docId,
                       Name primaryType,
                       Set<Name> mixinTypes,
                       String newParentDocId,
                       String oldParentDocId,
                       String newPath,
                       String oldPath)

      Description copied from interface: `ConnectorChangeSet`
      Signal that a node resource (and all descendants) was moved from one parent to another.
      Specified by:
        `nodeMoved` in interface `ConnectorChangeSet`
      Parameters:
        `docId` - the connector's identifier 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
        `newParentDocId` - the connector's identifier for the new parent of the node; may not be null
        `oldParentDocId` - the connector's identifier for 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

    - #### nodeReordered

          public void nodeReordered(String docId,
                           Name primaryType,
                           Set<Name> mixinTypes,
                           String parentDocId,
                           String newPath,
                           String oldNameSegment,
                           String reorderedBeforeNameSegment)

      Description copied from interface: `ConnectorChangeSet`
      Signal that a node resource (and all descendants) was placed into a new location within the same parent.
      Specified by:
        `nodeReordered` in interface `ConnectorChangeSet`
      Parameters:
        `docId` - the connector's identifier 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
        `parentDocId` - the connector's identifier 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
        `oldNameSegment` - the name segment (i.e., the name and if applicable the SNS index) for the node before it was reordered; may not be null
        `reorderedBeforeNameSegment` - the name segment of the node (in the same parent) before which the node was moved; or

    - #### propertyAdded

          public void propertyAdded(String docId,
                           Name nodePrimaryType,
                           Set<Name> nodeMixinTypes,
                           String nodePath,
                           Property property)

      Description copied from interface: `ConnectorChangeSet`
      Signal that a property was added to a node resource.
      Specified by:
        `propertyAdded` in interface `ConnectorChangeSet`
      Parameters:
        `docId` - the connector's identifier for the node; 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

    - #### propertyRemoved

          public void propertyRemoved(String docId,
                             Name nodePrimaryType,
                             Set<Name> nodeMixinTypes,
                             String nodePath,
                             Property property)

      Description copied from interface: `ConnectorChangeSet`
      Signal that a property was removed from a node resource.
      Specified by:
        `propertyRemoved` in interface `ConnectorChangeSet`
      Parameters:
        `docId` - the connector's identifier for the node; 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

    - #### propertyChanged

          public void propertyChanged(String docId,
                             Name nodePrimaryType,
                             Set<Name> nodeMixinTypes,
                             String nodePath,
                             Property oldProperty,
                             Property newProperty)

      Description copied from interface: `ConnectorChangeSet`
      Signal that a property resource was changed on a node resource.
      Specified by:
        `propertyChanged` in interface `ConnectorChangeSet`
      Parameters:
        `docId` - the connector's identifier for the node; 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
        `oldProperty` - the old property, with name and value(s); may be null
        `newProperty` - the new property, with name and value(s); may not be null

    - #### publish

          public void publish(Map<String,String> data)

      Description copied from interface: `ConnectorChangeSet`
      Finish the construction of this change-set and make it available for publication into the repository. This also empties the record of change events and prepares to accept a new record.

      Once a change set has been published, it may not be used again.

      Specified by:
        `publish` in interface `ConnectorChangeSet`
      Parameters:
        `data` - the name-value pairs that may be associated with the set of changes; may be null or empty

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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