9596979899100101102103104105
MongoNode parent = getStoredNode(parentNodePath); if (parent.childExists(nodeName)) { throw new RuntimeException("There's already a child node with name '" + nodeName + "'"); } getStagedNode(nodePath); parent.addChild(nodeName); } @Override public void visit(SetPropertyInstruction instruction) { String key = instruction.getKey();
155156157158159160161162163164165
} copy(getStoredNode(srcPath, false), destPath); // Finally, add to destParent. destParent.addChild(destNodeName); } @Override public void visit(MoveNodeInstruction instruction) { String srcPath = instruction.getSourcePath();
248249250251252253254255256257258
children.remove(child); } } if (srcNode.getAddedChildren() != null) { for (String child : srcNode.getAddedChildren()) { destNode.addChild(child); children.add(child); } } for (String child : children) { String srcChildPath = PathUtils.concat(srcNode.getPath(), child);