srcName = srcPath.getNameElement();
srcParentPath = srcPath.getAncestor(1);
targetNode = getItemManager().getNode(srcPath);
srcParentNode = getItemManager().getNode(srcParentPath);
} catch (AccessDeniedException ade) {
throw new PathNotFoundException(srcAbsPath);
} catch (NameException e) {
String msg = srcAbsPath + ": invalid path";
log.debug(msg);
throw new RepositoryException(msg, e);
}
Path destPath;
Path.Element destName;
Path destParentPath;
NodeImpl destParentNode;
try {
destPath = getQPath(destAbsPath).getNormalizedPath();
if (!destPath.isAbsolute()) {
throw new RepositoryException("not an absolute path: " + destAbsPath);
}
if (srcPath.isAncestorOf(destPath)) {
String msg = destAbsPath + ": invalid destination path (cannot be descendant of source path)";
log.debug(msg);
throw new RepositoryException(msg);
}
destName = destPath.getNameElement();
destParentPath = destPath.getAncestor(1);
destParentNode = getItemManager().getNode(destParentPath);
} catch (AccessDeniedException ade) {
throw new PathNotFoundException(destAbsPath);
} catch (NameException e) {
String msg = destAbsPath + ": invalid path";
log.debug(msg);
throw new RepositoryException(msg, e);
}