// check sanity of this session
sanityCheck();
// check paths & get node instances
Path srcPath;
Path.PathElement srcName;
Path srcParentPath;
NodeImpl targetNode;
NodeImpl srcParentNode;
try {
srcPath = PathFormat.parse(srcAbsPath, getNamespaceResolver()).getNormalizedPath();
if (!srcPath.isAbsolute()) {
throw new RepositoryException("not an absolute path: " + srcAbsPath);
}
srcName = srcPath.getNameElement();
srcParentPath = srcPath.getAncestor(1);
ItemImpl item = getItemManager().getItem(srcPath);
if (!item.isNode()) {
throw new PathNotFoundException(srcAbsPath);
}
targetNode = (NodeImpl) item;
srcParentNode = (NodeImpl) getItemManager().getItem(srcParentPath);
} catch (AccessDeniedException ade) {
throw new PathNotFoundException(srcAbsPath);
} catch (MalformedPathException mpe) {
String msg = srcAbsPath + ": invalid path";
log.debug(msg);
throw new RepositoryException(msg, mpe);
}
Path destPath;
Path.PathElement destName;
Path destParentPath;
NodeImpl destParentNode;
try {
destPath = PathFormat.parse(destAbsPath, getNamespaceResolver()).getNormalizedPath();
if (!destPath.isAbsolute()) {
throw new RepositoryException("not an absolute path: " + destAbsPath);