Examples of ItemNotFoundException


Examples of javax.jcr.ItemNotFoundException

               return primaryItem;

         }
      }

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

Examples of javax.jcr.ItemNotFoundException

      }

      // 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

Examples of javax.jcr.ItemNotFoundException

            if (corrSession.getWorkspace().getNodeTypesHolder()
               .isNodeType(Constants.MIX_REFERENCEABLE, 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

Examples of javax.jcr.ItemNotFoundException

               return primaryItem;

         }
      }

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

Examples of javax.jcr.ItemNotFoundException

      }

      // 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

Examples of javax.jcr.ItemNotFoundException

        sanityCheck();

        try {
            return (NodeImpl) getItemManager().getItem(id);
        } catch (AccessDeniedException ade) {
            throw new ItemNotFoundException(id.toString());
        }
    }
View Full Code Here

Examples of javax.jcr.ItemNotFoundException

            NodeImpl node = getNodeById(new NodeId(uuid));
            if (node.isNodeType(NameConstants.MIX_REFERENCEABLE)) {
                return node;
            } else {
                // there is a node with that uuid but the node does not expose it
                throw new ItemNotFoundException(uuid);
            }
        } catch (IllegalArgumentException e) {
            // Assuming the exception is from UUID.fromString()
            throw new RepositoryException("Invalid UUID: " + uuid, e);
        }
View Full Code Here

Examples of javax.jcr.ItemNotFoundException

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

Examples of name.shamansir.mvp4glayoutdemo.client.service.exception.ItemNotFoundException

        return new HashSet<NewsItem>(news.values());
    }

    @Override
    public NewsItem getNewsItem(int nid) throws ItemNotFoundException {
        if (!news.containsKey(nid)) throw new ItemNotFoundException(nid);
        return news.get(nid);
    }
View Full Code Here

Examples of org.apache.empire.exceptions.ItemNotFoundException

                        record.setValue(column, value);
                }
                else if (column.isRequired())
                {   // Reference column not provided
                    log.warn("Value for reference column has not been provided!");
                    throw new ItemNotFoundException(name);
                }
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.