Package com.google.enterprise.connector.spi

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


    testRootListFilesException(new IOException("Test Exception"));
  }

  public void testRootListFilesDocumentAccessException() throws Exception {
    testRootListFilesException(
        new DocumentAccessException("Test Exception"));
  }
View Full Code Here


        @Override
        public boolean configure(MockReadonlyFile file) {
          if ("top-secret".equals(file.getName())) {
            file.setCanRead(false);
            file.setException(MockReadonlyFile.Where.LIST_FILES,
                 new DocumentAccessException("Test Exception"));
          }
          return false;
        }
      };
View Full Code Here

    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);
    }
    return result;
  }
View Full Code Here

    if (smbe.getNtStatus() == SmbException.NT_STATUS_LOGON_FAILURE) {
      throw new InvalidUserException(
          "Please specify correct user name and password for " + path,
          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

TOP

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

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.