Package javax.jcr

Examples of javax.jcr.ItemNotFoundException


         NodeData childState = (NodeData)stateMgr.getItemData(nodeData.getIdentifier());
         if (childState == null)
         {
            handler.getOnWorkspaceInconsistencyHandler().handleMissingChildNode(
               new ItemNotFoundException("Child not found "), handler, nodeData.getQPath(), node, nodeData);
         }

         if (nodeData != null)
         {
            count = createIndex(nodeData, stateMgr, count);
View Full Code Here


   Document createDocument(String id) throws RepositoryException
   {
      ItemData data = handler.getContext().getItemStateManager().getItemData(id);
      if (data == null)
      {
         throw new ItemNotFoundException("Item id=" + id + " not found");
      }
      if (!data.isNode())
      {
         throw new RepositoryException("Item with id " + id + " is not a node");
      }
View Full Code Here

         NodeData childState = (NodeData)stateMgr.getItemData(nodeData.getIdentifier());
         if (childState == null)
         {
            handler.getOnWorkspaceInconsistencyHandler().handleMissingChildNode(
               new ItemNotFoundException("Child not found "), handler, nodeData.getQPath(), node, nodeData);
         }

         if (nodeData != null)
         {
            count = createIndex(nodeData, stateMgr, count);
View Full Code Here

                  // excerpt function with parameter
                  return getExcerpt(propertyName);
               }
               else
               {
                  throw new ItemNotFoundException(propertyName);
               }
            }
            if (Constants.JCR_PATH.equals(prop))
            {
               // QValue p =
               // QVALUE_FACTORY.create(hmgr.getPath(sn[0].getNodeId()));
               ItemData item = itemMgr.getItemData(sn[0].getNodeId());
               if (item == null)
                  throw new ItemNotFoundException(sn[0].getNodeId());
               String path = resolver.createJCRPath(item.getQPath()).getAsString(false);
               return valueFactory.createValue(path, PropertyType.PATH);
            }
            else if (getNodeImpl().hasProperty(propertyName))
            {
View Full Code Here

      public String getPath() throws RepositoryException
      {
         checkSingleSelector("Use getPath(String) instead.");
         ItemData item = itemMgr.getItemData(sn[0].getNodeId());
         if (item == null)
            throw new ItemNotFoundException("Item not found " + sn[0].getNodeId());
         return resolver.createJCRPath(item.getQPath()).getAsString(false);
      }
View Full Code Here

   Document createDocument(String id) throws RepositoryException
   {
      ItemData data = handler.getContext().getItemStateManager().getItemData(id);
      if (data == null)
      {
         throw new ItemNotFoundException("Item id=" + id + " not found");
      }
      if (!data.isNode())
      {
         throw new RepositoryException("Item with id " + id + " is not a node");
      }
View Full Code Here

   public String getStoredQueryPath() throws ItemNotFoundException, RepositoryException
   {
      checkInitialized();
      if (node == null)
      {
         throw new ItemNotFoundException("not a persistent query");
      }
      return node.getPath();
   }
View Full Code Here

               ancestor.getPrimaryTypeName(), ancestor.getMixinTypeNames()))
            {
               NodeData corrAncestor = (NodeData)corrDataManager.getItemData(ancestor.getIdentifier());
               if (corrAncestor == null)
               {
                  throw new ItemNotFoundException("No corresponding path for ancestor "
                     + ancestor.getQPath().getAsString() + " in " + corrSession.getWorkspace().getName());
               }

               NodeData corrNode =
                  (NodeData)corrDataManager.getItemData(corrAncestor, myPath.getRelPath(myPath.getDepth() - i),
                     ItemType.NODE);
               if (corrNode != null)
               {
                  return corrNode;
               }
            }
         }
      }
      NodeData corrNode = (NodeData)corrDataManager.getItemData(myPath);
      if (corrNode != null)
      {
         return corrNode;
      }

      throw new ItemNotFoundException("No corresponding path for " + getPath() + " in "
         + corrSession.getWorkspace().getName());
   }
View Full Code Here

            }

         }
      }

      throw new ItemNotFoundException("Primary item not found for " + getPath());
   }
View Full Code Here

      }

      // check existence
      if (dataManager.getItemData(srcPath) == null)
      {
         throw new ItemNotFoundException(getPath() + " has no child node with name " + srcPath.getName().getAsString());
      }

      if (destPath != null && dataManager.getItemData(destPath) == null)
      {

         throw new ItemNotFoundException(getPath() + " has no child node with name " + destPath.getName().getAsString());
      }

      if (!checkedOut())
      {
         throw new VersionException(" cannot change child node ordering of a checked-in node ");
      }

      if (destPath != null && srcPath.getDepth() != destPath.getDepth())
      {
         throw new ItemNotFoundException("Source and destenation is not relative paths of depth one, "
            + "i.e. is not a childs of same parent node");
      }

      List<NodeData> siblings = new ArrayList<NodeData>(dataManager.getChildNodesData(nodeData()));
      if (siblings.size() < 2)
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.