|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.cache.change.RecordingChanges
@ThreadSafe public class RecordingChanges
A thread-safe Changes
implementation that records the changes and makes them available for iteration.
Constructor Summary | |
---|---|
RecordingChanges(String processKey,
String repositoryKey)
|
|
RecordingChanges(String processKey,
String repositoryKey,
String workspaceName)
|
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. |
Set<NodeKey> |
changedNodes()
|
void |
freeze(String userId,
Map<String,String> userData,
DateTime timestamp)
|
String |
getProcessKey()
Get the key of the process in which the changes were made. |
String |
getRepositoryKey()
Get the key of the repository in which the changes were made. |
DateTime |
getTimestamp()
|
Map<String,String> |
getUserData()
|
String |
getUserId()
|
String |
getWorkspaceName()
Get the name of the workspace in which the changes were made. |
boolean |
isEmpty()
|
Iterator<Change> |
iterator()
Returns an iterator over the elements in this queue in proper sequence. |
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 newPath,
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 |
setChangedNodes(Set<NodeKey> keys)
|
int |
size()
Return the number of individual changes. |
String |
toString()
|
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, wait, wait, wait |
Constructor Detail |
---|
public RecordingChanges(String processKey, String repositoryKey)
public RecordingChanges(String processKey, String repositoryKey, String workspaceName)
Method Detail |
---|
public void workspaceAdded(String workspaceName)
Changes
workspaceAdded
in interface Changes
workspaceName
- the name of the workspace; may not be nullpublic void workspaceRemoved(String workspaceName)
Changes
workspaceRemoved
in interface Changes
workspaceName
- the name of the workspace; may not be nullpublic void nodeCreated(NodeKey key, NodeKey parentKey, Path path, Map<Name,Property> properties)
Changes
nodeCreated
in interface Changes
key
- the key for the new node; may not be nullparentKey
- the key for the parent of the new node; may not be nullpath
- the path to the new node; may not be nullproperties
- the properties in the new node, or null if there are nonepublic void nodeRemoved(NodeKey key, NodeKey parentKey, Path path)
Changes
nodeRemoved
in interface Changes
key
- the key for the removed node; may not be nullparentKey
- the key for the old parent of the removed node; may not be nullpath
- the path to the removed node; may not be nullpublic void nodeRenamed(NodeKey key, Path newPath, Path.Segment oldName)
Changes
nodeRenamed
in interface Changes
key
- the key for the node; may not be nullnewPath
- the new path for the node; may not be nulloldName
- the old name (including SNS index); may not be nullpublic void nodeMoved(NodeKey key, NodeKey newParent, NodeKey oldParent, Path newPath, Path oldPath)
Changes
nodeMoved
in interface Changes
key
- the key for the node; may not be nullnewParent
- the new parent for the node; may not be nulloldParent
- 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 nullpublic void nodeReordered(NodeKey key, NodeKey parent, Path newPath, Path oldPath, Path reorderedBeforePath)
Changes
nodeReordered
in interface Changes
key
- the key for the node; may not be nullparent
- the key for the parent of the node; may not be nullnewPath
- the new path for the node after it has been reordered; may not be nulloldPath
- the old path for the node before it was reordered; may not be nullreorderedBeforePath
- 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 nodepublic void nodeChanged(NodeKey key, Path path)
Changes
nodeChanged
in interface Changes
key
- the node key; may not be nullpath
- the pathpublic void nodeSequenced(NodeKey sequencedNodeKey, Path sequencedNodePath, NodeKey outputNodeKey, Path outputNodePath, String outputPath, String userId, String selectedPath, String sequencerName)
Changes
nodeSequenced
in interface Changes
sequencedNodeKey
- the key of the node that was used as input and sequenced; may not be nullsequencedNodePath
- the path of the node that was used as input and sequenced; may not be nulloutputNodeKey
- the key of the top-level node output by the sequencing operation; may not be nulloutputNodePath
- the path of the top-level node output by the sequencing operation; may not be nulloutputPath
- the string representation of the output path of the sequencing operationuserId
- the username of the session that generated the change that led to the sequencing operationselectedPath
- 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 nullsequencerName
- the name of the sequencer; may not be nullpublic void nodeSequencingFailure(NodeKey sequencedNodeKey, Path sequencedNodePath, String outputPath, String userId, String selectedPath, String sequencerName, Throwable cause)
Changes
nodeSequencingFailure
in interface Changes
sequencedNodeKey
- the key of the node that was used as input and sequenced; may not be nullsequencedNodePath
- the path of the node that was used as input and sequenced; may not be nulloutputPath
- the string representation of the output path of the sequencing operationuserId
- the username of the session that generated the change that led to the (failed) sequencing operationselectedPath
- 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 nullsequencerName
- the name of the sequencer; may not be nullcause
- the exception that caused the failure; may not be nullpublic void propertyAdded(NodeKey key, Path nodePath, Property property)
Changes
propertyAdded
in interface Changes
key
- the key of the node that was changed; may not be nullnodePath
- the path of the node that was changedproperty
- the new property, with name and value(s); may not be nullpublic void propertyRemoved(NodeKey key, Path nodePath, Property property)
Changes
propertyRemoved
in interface Changes
key
- the key of the node that was changed; 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 nullpublic void propertyChanged(NodeKey key, Path nodePath, Property newProperty, Property oldProperty)
Changes
propertyChanged
in interface Changes
key
- the key of the node that was changed; may not be nullnodePath
- the path of the node that was changednewProperty
- the new property, with name and value(s); may not be nulloldProperty
- the old property, with name and value(s); may not be nullpublic void binaryValueNoLongerUsed(BinaryKey key)
Changes
binaryValueNoLongerUsed
in interface Changes
key
- the key for the now-unused binary value; may not be nullpublic void binaryValueNowUsed(BinaryKey key)
Changes
binaryValueNowUsed
in interface Changes
key
- the key for the now-used binary value; may not be nullpublic int size()
ChangeSet
size
in interface ChangeSet
public boolean isEmpty()
isEmpty
in interface ChangeSet
public Iterator<Change> iterator()
ConcurrentModificationException
, and guarantees to traverse elements as they existed
upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.
iterator
in interface Iterable<Change>
Iterable.iterator()
public Set<NodeKey> changedNodes()
changedNodes
in interface ChangeSet
public void setChangedNodes(Set<NodeKey> keys)
public void freeze(String userId, Map<String,String> userData, DateTime timestamp)
public String getProcessKey()
ChangeSet
getProcessKey
in interface ChangeSet
public String getRepositoryKey()
ChangeSet
getRepositoryKey
in interface ChangeSet
public String getWorkspaceName()
ChangeSet
getWorkspaceName
in interface ChangeSet
public DateTime getTimestamp()
getTimestamp
in interface ChangeSet
public Map<String,String> getUserData()
getUserData
in interface ChangeSet
public String getUserId()
getUserId
in interface ChangeSet
public String toString()
toString
in class Object
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |