}
// check existence
if (dataManager.getItemData(srcPath) == null)
{
throw new ItemNotFoundException(getPath() + " has no child node with name " + srcPath.getName().getAsString());
}
if (destPath != null && dataManager.getItemData(destPath) == null)
{
throw new ItemNotFoundException(getPath() + " has no child node with name " + destPath.getName().getAsString());
}
if (!checkedOut())
{
throw new VersionException(" cannot change child node ordering of a checked-in node ");
}
if (destPath != null && srcPath.getDepth() != destPath.getDepth())
{
throw new ItemNotFoundException("Source and destenation is not relative paths of depth one, "
+ "i.e. is not a childs of same parent node");
}
List<NodeData> siblings = new ArrayList<NodeData>(dataManager.getChildNodesData(nodeData()));
if (siblings.size() < 2)