Package javax.jcr

Examples of javax.jcr.ItemNotFoundException


      {
         // 6.2.8 If depth > n is specified then an ItemNotFoundException is
         // thrown.
         if (degree < 0)
         {
            throw new ItemNotFoundException("Can't get ancestor with ancestor's degree < 0.");
         }

         final QPath myPath = getData().getQPath();
         int n = myPath.getDepth() - degree;
         if (n == 0)
         {
            return this;
         }
         else if (n < 0)
         {
            throw new ItemNotFoundException("Can't get ancestor with ancestor's degree > depth of this item.");
         }
         else
         {
            final QPath ancestorPath = myPath.makeAncestorPath(n);
            return dataManager.getItem(ancestorPath, true);
         }
      }
      catch (PathNotFoundException e)
      {
         throw new ItemNotFoundException(e.getMessage(), e);
      }
   }
View Full Code Here


      checkValid();

      if (isRoot())
      {
         throw new ItemNotFoundException("Root node does not have a parent");
      }

      return parent(true);
   }
View Full Code Here

   protected NodeImpl parent(final boolean pool) throws RepositoryException
   {
      NodeImpl parent = (NodeImpl)dataManager.getItemByIdentifier(getParentIdentifier(), pool);
      if (parent == null)
      {
         throw new ItemNotFoundException("FATAL: Parent is null for " + getPath() + " parent UUID: "
            + getParentIdentifier());
      }
      return parent;
   }
View Full Code Here

   {
      checkValid();
      NodeData parent = (NodeData)dataManager.getItemData(getData().getParentIdentifier());
      if (parent == null)
      {
         throw new ItemNotFoundException("FATAL: Parent is null for " + getPath() + " parent UUID: "
            + getData().getParentIdentifier());
      }

      return parent;
   }
View Full Code Here

         {
            LOG.error("jcr:versionableUuid, error of read " + e + ". Version history " + getPath(), e);
         }
      }

      throw new ItemNotFoundException("A property jcr:versionableUuid is not found. Version history " + getPath());
   }
View Full Code Here

      if (item != null && item.isNode())
      {
         return (Node)item;
      }

      throw new ItemNotFoundException("Node not found " + identifier + " at " + workspaceName);
   }
View Full Code Here

         NodeImpl node = (NodeImpl)item;
         node.getUUID(); // throws exception
         return node;
      }

      throw new ItemNotFoundException("Node not found " + uuid + " at " + workspaceName);

   }
View Full Code Here

      if (item != null && item.isNode())
      {
         return (NodeImpl)item;
      }

      throw new ItemNotFoundException("Node not found " + JCRPath.ROOT_PATH + " at " + workspaceName);
   }
View Full Code Here

      if (item != null && item.isNode())
      {
         return (Node)item;
      }

      throw new ItemNotFoundException("Node not found " + identifier + " at " + workspaceName);
   }
View Full Code Here

         NodeImpl node = (NodeImpl)item;
         node.getUUID(); // throws exception
         return node;
      }

      throw new ItemNotFoundException("Node not found " + uuid + " at " + workspaceName);

   }
View Full Code Here

TOP

Related Classes of javax.jcr.ItemNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.