Examples of DocumentNotFoundException


Examples of com.baasbox.dao.exception.DocumentNotFoundException


  public ODocument get(ORID rid) throws InvalidModelException, DocumentNotFoundException {
    if (Logger.isTraceEnabled()) Logger.trace("Method Start");
    Object doc=db.load(rid);
    if (doc==null) throw new DocumentNotFoundException();
    if (!(doc instanceof ODocument)) throw new IllegalArgumentException(rid +" is a rid not referencing a valid Document");
    try{
      checkModelDocument((ODocument)doc);
    }catch(InvalidModelException e){
      //the rid may reference a ORecordBytes which is not a ODocument
View Full Code Here

Examples of com.baasbox.dao.exception.DocumentNotFoundException

      try {
        file = getById(id);
      } catch (InvalidModelException e1) {
        throw new DocumentIsNotAFileException("The id " + id + " is not a file");
      }
      if (file==null) throw new DocumentNotFoundException();
      //is the file an image?
      if (!StorageUtils.docIsAnImage(file)) throw new DocumentIsNotAnImageException("The file " + id + " is not an image");
      //are the dimensions allowed?
      //the check is delegated to the caller
      String sizePattern= dimensions.toString();
View Full Code Here

Examples of com.baasbox.dao.exception.DocumentNotFoundException

 
  public static OrientVertex getNodeVertex(String nodeId) throws DocumentNotFoundException{
    GenericDao dao = GenericDao.getInstance();
    OrientGraph conn = DbHelper.getOrientGraphConnection();
    ORID nodeORID = dao.getRidNodeByUUID(nodeId);
    if (nodeORID==null) throw new DocumentNotFoundException(nodeId + " is not a valid Id");
    ODocument nodeDoc = dao.get(nodeORID);
    if (nodeDoc==null) throw new DocumentNotFoundException(nodeId + " is not a valid Id");
    return conn.getVertex(nodeDoc.field(NodeDao.FIELD_LINK_TO_VERTEX));
  }
View Full Code Here

Examples of com.baasbox.dao.exception.DocumentNotFoundException

    ODocument doc=dao.get(rid);
    if(parser.isMultiField()){
      Object v = doc.field(parser.treeFields());

      if(v==null){
        throw new DocumentNotFoundException("Unable to find a field "+parser.treeFields()+" into document:"+rid);
      }
    }

    StringBuffer q = new StringBuffer();
    q.append("select ")
View Full Code Here

Examples of com.google.enterprise.connector.spi.DocumentNotFoundException

    if (!isPath(path)) {
      throw new IllegalArgumentException("Invalid path " + path);
    }
    T result = getFile(path, credentials);
    if (!result.exists()) {
      throw new DocumentNotFoundException("Path does not exist: " + path);
    }
    if (!result.canRead()) {
      throw new DocumentAccessException("User does not have access to "
                                        + path);
    }
View Full Code Here

Examples of org.apache.jetspeed.page.document.DocumentNotFoundException

    {
        // get link
        Link link = (Link) getAllNodes().subset(Link.DOCUMENT_TYPE).get(name);
        if (link == null)
        {
            throw new DocumentNotFoundException("Jetspeed PSML link not found: " + name);
        }

        // check access
        if (checkAccess)
        {
View Full Code Here

Examples of org.apache.jetspeed.page.document.DocumentNotFoundException

    {
        // get documentSet
        DocumentSet documentSet = (DocumentSet) getAllNodes().subset(DocumentSet.DOCUMENT_TYPE).get(name);
        if (documentSet == null)
        {
            throw new DocumentNotFoundException("Jetspeed PSML document set not found: " + name);
        }

        // check access
        if (checkAccess)
        {
View Full Code Here

Examples of org.apache.jetspeed.page.document.DocumentNotFoundException

        // get pageSecurity
        PageSecurity pageSecurity = (PageSecurity) getAllNodes().subset(PageSecurity.DOCUMENT_TYPE).get(PageSecurity.DOCUMENT_TYPE);
        if (pageSecurity == null)
        {
            throw new DocumentNotFoundException("Jetspeed PSML page security not found: " + PageSecurity.DOCUMENT_TYPE);
        }
        return pageSecurity;
    }
View Full Code Here

Examples of org.apache.jetspeed.page.document.DocumentNotFoundException

            if (link != null)
            {
                return link;
            }
        }
        throw new DocumentNotFoundException("Link " + name + " not found at " + getPath());
    }
View Full Code Here

Examples of org.apache.jetspeed.page.document.DocumentNotFoundException

            Link link = (Link)getPersistenceBrokerTemplate().getObjectByQuery(query);
           
            // return link or throw exception
            if (link == null)
            {
                throw new DocumentNotFoundException("Link " + path + " not found.");
            }

            // check for view access on link
            link.checkAccess(JetspeedActions.VIEW);

            return link;
        }
        catch (DocumentNotFoundException dnfe)
        {
            throw dnfe;
        }
        catch (SecurityException se)
        {
            throw se;
        }
        catch (Exception e)
        {
            throw new DocumentNotFoundException("Link " + path + " not found.", e);
        }
    }
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.