public abstract class ChangeSetAdapter extends Object implements ChangeSetListener
Modifier and Type | Class and Description |
---|---|
static interface |
ChangeSetAdapter.NodeTypePredicate |
Modifier and Type | Field and Description |
---|---|
protected ExecutionContext |
context |
protected ChangeSetAdapter.NodeTypePredicate |
predicate |
Constructor and Description |
---|
ChangeSetAdapter(ExecutionContext context) |
ChangeSetAdapter(ExecutionContext context,
ChangeSetAdapter.NodeTypePredicate predicate) |
Modifier and Type | Method and Description |
---|---|
protected void |
addNode(String workspaceName,
NodeKey key,
Path path,
Name primaryType,
Set<Name> mixinTypes,
CachedNode.Properties properties)
Handle the addition of a node.
|
protected void |
addWorkspace(String workspaceName)
Handle the addition of a new workspace in the repository.
|
protected void |
beginChanges()
Signals the beginning of processing for the changes in a transaction described by a single
ChangeSet . |
protected void |
beginWorkspaceChanges()
Signals the beginning of processing for the workspace-related changes in a transaction described by a single
ChangeSet . |
protected void |
binaryValueUnused(BinaryKey key)
Handle the marking of a binary value as being unused.
|
protected void |
changeNode(String workspaceName,
NodeKey key,
Path path,
Name primaryType,
Set<Name> mixinTypes)
Handle the change of a node.
|
protected void |
completeChanges()
Signals the end of processing for the changes in a transaction described by a single
ChangeSet . |
protected void |
completeWorkspaceChanges()
Signals the end of processing for the workspace-related changes in a transaction described by a single
ChangeSet . |
protected boolean |
includesWorkspace(String workspaceName)
Determine whether changes in the named workspace should be processed.
|
protected void |
modifyProperties(NodeKey key,
Name primaryType,
Set<Name> mixinTypes,
Map<Name,AbstractPropertyChange> propChanges)
Handle the addition, change, and removal of one or more properties of a single node.
|
protected void |
moveNode(String workspaceName,
NodeKey key,
Name primaryType,
Set<Name> mixinTypes,
NodeKey oldParent,
NodeKey newParent,
Path newPath,
Path oldPath)
Handle the move of a node.
|
void |
notify(ChangeSet changeSet)
Notifies a listener of the given changes.
|
protected void |
reindexNode(String workspaceName,
NodeKey key,
Path path,
Name primaryType,
Set<Name> mixinTypes,
CachedNode.Properties properties,
boolean queryable)
Handle the reindexing of a node.
|
protected void |
removeNode(String workspaceName,
NodeKey key,
NodeKey parentKey,
Path path,
Name primaryType,
Set<Name> mixinTypes)
Handle the removal of a node.
|
protected void |
removeWorkspace(String workspaceName)
Handle the removal of a workspace in the repository.
|
protected void |
renameNode(String workspaceName,
NodeKey key,
Path newPath,
Path.Segment oldSegment,
Name primaryType,
Set<Name> mixinTypes)
Handle the renaming of a node.
|
protected void |
reorderNode(String workspaceName,
NodeKey key,
Name primaryType,
Set<Name> mixinTypes,
NodeKey parent,
Path newPath,
Path oldPath,
Path reorderedBeforePath)
Handle the reordering of a node.
|
protected void |
repositoryMetadataChanged()
Handle the changing of the repository metadata information.
|
protected void |
sequenced(String workspaceName,
NodeKey sequencedNodeKey,
Path sequencedNodePath,
Name sequencedNodePrimaryType,
Set<Name> sequencedNodeMixinTypes,
NodeKey outputNodeKey,
Path outputNodePath,
String outputPath,
String userId,
String selectedPath,
String sequencerName) |
protected void |
sequenceFailure(String workspaceName,
NodeKey sequencedNodeKey,
Path sequencedNodePath,
Name sequencedNodePrimaryType,
Set<Name> sequencedNodeMixinTypes,
String outputPath,
String userId,
String selectedPath,
String sequencerName,
Throwable cause) |
protected final ExecutionContext context
protected final ChangeSetAdapter.NodeTypePredicate predicate
public ChangeSetAdapter(ExecutionContext context)
context
- the execution context in which this adapter is supposed to run; may not be nullpublic ChangeSetAdapter(ExecutionContext context, ChangeSetAdapter.NodeTypePredicate predicate)
public void notify(ChangeSet changeSet)
ChangeSetListener
notify
in interface ChangeSetListener
changeSet
- a non-null
ChangeSet
protected void beginWorkspaceChanges()
ChangeSet
.completeWorkspaceChanges()
protected void completeWorkspaceChanges()
ChangeSet
.beginWorkspaceChanges()
protected void beginChanges()
ChangeSet
.completeChanges()
protected void completeChanges()
ChangeSet
.beginChanges()
protected void modifyProperties(NodeKey key, Name primaryType, Set<Name> mixinTypes, Map<Name,AbstractPropertyChange> propChanges)
key
- the unique key for the node; may not be nullprimaryType
- the primary type of the node for which the modifications occurred; never nullmixinTypes
- the mixin types of the node for which the modifications occurred; never null but possibly emptypropChanges
- the map of property modification events, keyed by the names of the properties; never null and neverprotected boolean includesWorkspace(String workspaceName)
true
, which
means changes to content in all workspaces are handled by this adapter.workspaceName
- the workspace that has changes in contentprotected void addNode(String workspaceName, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, CachedNode.Properties properties)
workspaceName
- the workspace in which the node information should be available; may not be nullkey
- the unique key for the node; may not be nullpath
- the path of the node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types for the node; may not be null but may be emptyproperties
- the properties of the node; may not be null but may be emptyprotected void reindexNode(String workspaceName, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes, CachedNode.Properties properties, boolean queryable)
workspaceName
- the workspace in which the node information should be available; may not be nullkey
- the unique key for the node; may not be nullpath
- the path of the node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types for the node; may not be null but may be emptyproperties
- the properties of the node; may not be null but may be emptyqueryable
- true if the node is queryable, false otherwiseprotected void removeNode(String workspaceName, NodeKey key, NodeKey parentKey, Path path, Name primaryType, Set<Name> mixinTypes)
workspaceName
- the workspace in which the node information should be available; may not be nullkey
- the unique key for the node; may not be nullparentKey
- the unique key for the parent of the node; may not be nullpath
- the path of the node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types for the node; may not be null but may be emptyprotected void changeNode(String workspaceName, NodeKey key, Path path, Name primaryType, Set<Name> mixinTypes)
workspaceName
- the workspace in which the node information should be available; may not be nullkey
- the unique key for the node; may not be nullpath
- the path of the node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types for the node; may not be null but may be emptyprotected void moveNode(String workspaceName, NodeKey key, Name primaryType, Set<Name> mixinTypes, NodeKey oldParent, NodeKey newParent, Path newPath, Path oldPath)
workspaceName
- the workspace in which the node information should be available; may not be nullkey
- the unique key for the node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types for the node; may not be null but may be emptyoldParent
- the key of the node's parent before it was moved; may not be nullnewParent
- the key of the node's parent after it was moved; may not be nullnewPath
- the new path of the node after it was moved; may not be nulloldPath
- the old path of the node before it was moved; may not be nullprotected void renameNode(String workspaceName, NodeKey key, Path newPath, Path.Segment oldSegment, Name primaryType, Set<Name> mixinTypes)
workspaceName
- the workspace in which the node information should be available; may not be nullkey
- the unique key for the node; may not be nullnewPath
- the new path of the node after it was moved; may not be nulloldSegment
- the old segment of the node before it was moved; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types for the node; may not be null but may be emptyprotected void reorderNode(String workspaceName, NodeKey key, Name primaryType, Set<Name> mixinTypes, NodeKey parent, Path newPath, Path oldPath, Path reorderedBeforePath)
workspaceName
- the workspace in which the node information should be available; may not be nullkey
- the unique key for the node; may not be nullprimaryType
- the primary type of the node; may not be nullmixinTypes
- the mixin types for the node; may not be null but may be emptyparent
- the key of the node's parent; may not be nullnewPath
- the new path of the node after it was moved; may not be nulloldPath
- the old path of the node before it was moved; may not be nullreorderedBeforePath
- the path of the node before which the node was placed; null if it was moved to the endprotected void sequenced(String workspaceName, NodeKey sequencedNodeKey, Path sequencedNodePath, Name sequencedNodePrimaryType, Set<Name> sequencedNodeMixinTypes, NodeKey outputNodeKey, Path outputNodePath, String outputPath, String userId, String selectedPath, String sequencerName)
protected void sequenceFailure(String workspaceName, NodeKey sequencedNodeKey, Path sequencedNodePath, Name sequencedNodePrimaryType, Set<Name> sequencedNodeMixinTypes, String outputPath, String userId, String selectedPath, String sequencerName, Throwable cause)
protected void repositoryMetadataChanged()
protected void binaryValueUnused(BinaryKey key)
key
- the binary key of the binary value that is no longer used; may not be nullprotected void addWorkspace(String workspaceName)
workspaceName
- the name of the workspace that was added; may not be nullprotected void removeWorkspace(String workspaceName)
workspaceName
- the name of the workspace that was removed; may not be nullCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.