Ejemplo n.º 1
0
 public JCRNodeWrapper getNode(String path, boolean checkVersion)
     throws PathNotFoundException, RepositoryException {
   JCRItemWrapper item = getItem(path, checkVersion);
   if (item.isNode()) {
     return (JCRNodeWrapper) item;
   } else {
     throw new PathNotFoundException();
   }
 }
Ejemplo n.º 2
0
 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);
   }
 }
Ejemplo n.º 3
0
 void removeFromCache(JCRItemWrapper item) throws RepositoryException {
   sessionCacheByPath.remove(item.getPath());
   if (item instanceof JCRNodeWrapper) {
     sessionCacheByIdentifier.remove(((JCRNodeWrapper) item).getIdentifier());
   }
 }