log.warn("Attempting to move the root node. Not taking any action, treating this as a no-op.");
return;
}
WorkspaceNode oldParent = fetchWorkspaceNode(ctx, nodeFqn.getParent(), ws, false, true);
if (oldParent == null) throw new NodeNotExistsException("Node " + nodeFqn.getParent() + " does not exist!");
if (parentFqn.equals(oldParent.getFqn()))
{
log.warn("Attempting to move a node in same place. Not taking any action, treating this as a no-op.");
return;
}
// retrieve parent
WorkspaceNode parent = fetchWorkspaceNode(ctx, parentFqn, ws, false, true);
if (parent == null) throw new NodeNotExistsException("Node " + parentFqn + " does not exist!");
Object nodeName = nodeFqn.getLastElement();
// now that we have the parent and target nodes:
// first correct the pointers at the pruning point