protected class SessionNode.DeepCopy extends Object
Modifier and Type | Field and Description |
---|---|
protected Connectors |
connectors |
protected DocumentStore |
documentStore |
protected Map<NodeKey,NodeKey> |
linkedPlaceholdersToOriginal |
protected PropertyFactory |
propertyFactory |
protected SessionCache |
sourceCache |
protected Map<NodeKey,Set<Property>> |
sourceKeyToReferenceProperties |
protected CachedNode |
sourceNode |
protected Map<NodeKey,NodeKey> |
sourceToTargetKeys |
protected Path |
startingPathInSource |
protected String |
systemWorkspaceKey |
protected WritableSessionCache |
targetCache |
protected SessionNode |
targetNode |
protected String |
targetWorkspaceKey |
protected ValueFactories |
valueFactories |
Modifier | Constructor and Description |
---|---|
protected |
DeepCopy(SessionNode targetNode,
WritableSessionCache cache,
CachedNode sourceNode,
SessionCache sourceCache,
String systemWorkspaceKey,
Connectors connectors) |
Modifier and Type | Method and Description |
---|---|
protected Object |
convertToInternalBinaryValue(Object value) |
protected void |
copyProperties(MutableCachedNode targetNode,
CachedNode sourceNode,
boolean includeVersionProperties) |
protected void |
copyUUIDProperty(Property sourceProperty,
MutableCachedNode targetNode,
CachedNode sourceNode) |
protected NodeKey |
createTargetKeyFor(NodeKey sourceKey,
NodeKey parentKeyInTarget,
String preferredKey) |
protected void |
doPhase1(MutableCachedNode targetNode,
CachedNode sourceNode)
Perform a copy of the source tree to create a similar tree in the target session.
|
protected void |
doPhase2()
This leaves any linked placeholders that failed in the map.
|
void |
execute() |
protected String |
getOperationName() |
Map<NodeKey,NodeKey> |
getSourceToTargetKeys() |
protected void |
resolveReferences()
After the entire graph of nodes has been copied, look at each of the target nodes for reference properties pointing
towards nodes in the source graph that now have equivalent nodes in the target graph.
|
protected boolean |
shouldProcessSourceKey(NodeKey sourceKey) |
String |
toString() |
protected final WritableSessionCache targetCache
protected final SessionNode targetNode
protected final SessionCache sourceCache
protected final CachedNode sourceNode
protected final Path startingPathInSource
protected final PropertyFactory propertyFactory
protected final String targetWorkspaceKey
protected final Map<NodeKey,Set<Property>> sourceKeyToReferenceProperties
protected final DocumentStore documentStore
protected final String systemWorkspaceKey
protected final Connectors connectors
protected final ValueFactories valueFactories
protected DeepCopy(SessionNode targetNode, WritableSessionCache cache, CachedNode sourceNode, SessionCache sourceCache, String systemWorkspaceKey, Connectors connectors)
public void execute()
protected void doPhase1(MutableCachedNode targetNode, CachedNode sourceNode)
targetNode
- the (empty) target node that should be made to look like the supplied source node; may not be nullsourceNode
- the original node that should be copied; may not be nullprotected NodeKey createTargetKeyFor(NodeKey sourceKey, NodeKey parentKeyInTarget, String preferredKey)
protected void doPhase2()
protected void resolveReferences()
protected void copyProperties(MutableCachedNode targetNode, CachedNode sourceNode, boolean includeVersionProperties)
protected void copyUUIDProperty(Property sourceProperty, MutableCachedNode targetNode, CachedNode sourceNode)
protected String getOperationName()
protected boolean shouldProcessSourceKey(NodeKey sourceKey)
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.