public void move(String source, String dest) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException { getWorkspace().move(source, dest, true); if (sessionCacheByPath.containsKey(source)) { JCRNodeWrapper n = sessionCacheByPath.get(source); if (n instanceof JCRNodeDecorator) { n = ((JCRNodeDecorator) n).getDecoratedNode(); } ((JCRNodeWrapperImpl) n).localPath = dest; ((JCRNodeWrapperImpl) n).localPathInProvider = dest; } flushCaches(); }
public void removeItem(String absPath) throws VersionException, LockException, ConstraintViolationException, AccessDeniedException, RepositoryException { JCRItemWrapper item = getItem(absPath); boolean flushNeeded = false; if (item.isNode()) { JCRNodeWrapper node = (JCRNodeWrapper) item; unregisterNewNode(node); if (node.hasNodes()) { flushNeeded = true; } } item.remove(); if (flushNeeded) { flushCaches(); } else { removeFromCache(item); } }