@NotThreadSafe public class ConnectorChangeSetImpl extends Object implements ConnectorChangeSet
Constructor and Description |
---|
ConnectorChangeSetImpl(Connectors connectors,
Connectors.PathMappings mappings,
String sessionId,
String processId,
String repositoryKey,
ChangeBus bus,
DateTimeFactory timeFactory,
String journalId) |
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,
boolean queryable)
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,
boolean queryable)
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,
boolean queryable)
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,
boolean queryable)
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,
boolean queryable)
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,
boolean queryable)
Signal that a property resource was changed on a node resource.
|
void |
propertyRemoved(String docId,
Name nodePrimaryType,
Set<Name> nodeMixinTypes,
String nodePath,
Property property,
boolean queryable)
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() |
public ConnectorChangeSetImpl(Connectors connectors, Connectors.PathMappings mappings, String sessionId, String processId, String repositoryKey, ChangeBus bus, DateTimeFactory timeFactory, String journalId)
protected final RecordingChanges changesFor(WorkspaceAndPath workspaceAndPath)
protected final RecordingChanges changesFor(String workspaceName)
public void nodeCreated(String docId, String parentDocId, String path, Name primaryType, Set<Name> mixinTypes, Map<Name,Property> properties, boolean queryable)
ConnectorChangeSet
nodeCreated
in interface ConnectorChangeSet
docId
- the connector's identifier for the new node; may not be nullparentDocId
- the connector's identifier for the parent of the new node; may not be nullpath
- the path to the new node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types of the node; may not be nullproperties
- the properties in the new node, or null if there are nonequeryable
- true if this node is queryable, or false otherwisepublic void nodeRemoved(String docId, String parentDocId, String path, Name primaryType, Set<Name> mixinTypes, boolean queryable)
ConnectorChangeSet
nodeRemoved
in interface ConnectorChangeSet
docId
- the connector's identifier for the removed node; may not be nullparentDocId
- the connector's identifier for the parent of the removed node; may not be nullpath
- the path to the removed node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types of the node; may not be nullqueryable
- true if this node is queryable, or false otherwisepublic void nodeMoved(String docId, Name primaryType, Set<Name> mixinTypes, String newParentDocId, String oldParentDocId, String newPath, String oldPath, boolean queryable)
ConnectorChangeSet
nodeMoved
in interface ConnectorChangeSet
docId
- the connector's identifier for the node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types of the node; may not be nullnewParentDocId
- the connector's identifier for the new parent of the node; may not be nulloldParentDocId
- the connector's identifier for the old parent for the node; may not be nullnewPath
- the new path for the node after it has been moved; may not be nulloldPath
- the old path for the node before it was moved; may not be nullqueryable
- true if this node is queryable, or false otherwisepublic void nodeReordered(String docId, Name primaryType, Set<Name> mixinTypes, String parentDocId, String newPath, String oldNameSegment, String reorderedBeforeNameSegment, boolean queryable)
ConnectorChangeSet
nodeReordered
in interface ConnectorChangeSet
docId
- the connector's identifier for the node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types of the node; may not be nullparentDocId
- the connector's identifier for the parent of the node; may not be nullnewPath
- the new path for the node after it has been reordered; may not be nulloldNameSegment
- the name segment (i.e., the name and if applicable the SNS index) for the node before it was
reordered; may not be nullreorderedBeforeNameSegment
- the name segment of the node (in the same parent) before which the node was movedqueryable
- true if this node is queryable, or false otherwisepublic void propertyAdded(String docId, Name nodePrimaryType, Set<Name> nodeMixinTypes, String nodePath, Property property, boolean queryable)
ConnectorChangeSet
propertyAdded
in interface ConnectorChangeSet
docId
- the connector's identifier for the node; may not be nullnodePrimaryType
- the primary type of the node; may not be nullnodeMixinTypes
- the mixin types of the node; may not be nullnodePath
- the path of the node that was changedproperty
- the new property, with name and value(s); may not be nullqueryable
- true if this node is queryable, or false otherwisepublic void propertyRemoved(String docId, Name nodePrimaryType, Set<Name> nodeMixinTypes, String nodePath, Property property, boolean queryable)
ConnectorChangeSet
propertyRemoved
in interface ConnectorChangeSet
docId
- the connector's identifier for the node; may not be nullnodePrimaryType
- the primary type of the node; may not be nullnodeMixinTypes
- the mixin types of the node; may not be nullnodePath
- the path of the node that was changedproperty
- the property that was removed, with name and value(s); may not be nullqueryable
- true if this node is queryable, or false otherwisepublic void propertyChanged(String docId, Name nodePrimaryType, Set<Name> nodeMixinTypes, String nodePath, Property oldProperty, Property newProperty, boolean queryable)
ConnectorChangeSet
propertyChanged
in interface ConnectorChangeSet
docId
- the connector's identifier for the node; may not be nullnodePrimaryType
- the primary type of the node; may not be nullnodeMixinTypes
- the mixin types of the node; may not be nullnodePath
- the path of the node that was changedoldProperty
- the old property, with name and value(s); may be nullnewProperty
- the new property, with name and value(s); may not be nullqueryable
- true if this node is queryable, or false otherwisepublic void publish(Map<String,String> data)
ConnectorChangeSet
Once a change set has been published, it may not be used again.
publish
in interface ConnectorChangeSet
data
- the name-value pairs that may be associated with the set of changes; may be null or emptyCopyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.