コード例 #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();
   }
 }
コード例 #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);
   }
 }
コード例 #3
0
 void removeFromCache(JCRItemWrapper item) throws RepositoryException {
   sessionCacheByPath.remove(item.getPath());
   if (item instanceof JCRNodeWrapper) {
     sessionCacheByIdentifier.remove(((JCRNodeWrapper) item).getIdentifier());
   }
 }