String msg = "A node with name (" + destAbsPath + ") is already exists.";
throw new ItemExistsException(msg);
}
}
ItemDataCloneVisitor initializer =
new ItemDataCloneVisitor((NodeData) destParentNode.getData(), destNodePath.getName().getInternalName(),
nodeTypeManager, srcSession.getTransientNodesManager(), session.getTransientNodesManager(),
removeExisting, changes);
srcNode.getData().accept(initializer);
// removeing existing nodes and properties
if (removeExisting && initializer.getItemDeletedExistingStates(false).size() > 0)
{
changes.addAll(initializer.getItemDeletedExistingStates(true));
}
changes.addAll(initializer.getItemAddStates());
}