Package com.google.enterprise.connector.spi

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


          smbe);
    } else if (smbe.getNtStatus() == SmbException.NT_STATUS_ACCESS_DENIED) {
      throw new DocumentAccessException(
          "Access denied for " + path, smbe);
    } else if (smbe.getNtStatus() == SmbException.NT_STATUS_BAD_NETWORK_NAME) {
      throw new DocumentNotFoundException(
          "Path does not exist: " + path, smbe);
    }
  }
View Full Code Here

  private ReadonlyFile<?> getFile(String docid) throws RepositoryException {
    ReadonlyFile<?> file = pathParser.getFile(docid, context.getCredentials());
    if (file == null) {
      // Not one of our registered filesystems.
      throw new DocumentNotFoundException("Failed to open file: " + docid);
    }
    if (!file.exists()) {
      // File actually does not exist.
      throw new DocumentNotFoundException("File not found: " + docid);
    }
    // Verify that we would have actually fed this document.
    if (!isQualifiedFile(file)) {
      // File may or may-not exist, but it is not available to us.
      throw new SkippedDocumentException("Access denied: " + docid);
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.spi.DocumentNotFoundException

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.