// check sanity of this session
sanityCheck();
// check paths & get node instances
Path srcPath;
Path.Element srcName;
Path srcParentPath;
NodeImpl targetNode;
NodeImpl srcParentNode;
try {
srcPath = getQPath(srcAbsPath).getNormalizedPath();
if (!srcPath.isAbsolute()) {
throw new RepositoryException("not an absolute path: " + srcAbsPath);
}
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);