Package com.google.enterprise.connector.spi

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


      int supportLevel = traversalContext.mimeTypeSupportLevel(mimetype);
      if (supportLevel < 0) {
        if (logging) {
          logger.fine("excluded content format: " + format.getName());
        }
        throw new SkippedDocumentException("Excluded by content type: "
                                           + mimetype);
      }
      if (supportLevel == 0) {
        if (logging) {
          logger.fine("unindexable content format: " + format.getName());
View Full Code Here


        fileDocumentToDeleteDate = object.getModifyDate();
        docIdToDelete = object.get_Id();
        if (object.isReleasedVersion()) {
          fileDocument = createDeleteDocument(object);
        } else {
          throw new SkippedDocumentException("Skip a deletion event [ID: "
              + docIdToDelete + "] of an unreleased document.");
        }
      } else if (object instanceof FileDeletionObject) {
        fileDocumentToDeleteDocsDate = object.getModifyDate();
        docIdToDeleteDocs = object.get_Id();
        if (object.isReleasedVersion()) {
          fileDocument = createDeleteDocument(object);
        } else {
          throw new SkippedDocumentException("Skip custom deletion [ID: "
              + docIdToDeleteDocs + "] because document is not a released "
              + "version.");
        }
      } else {
        fileDocumentDate = object.getModifyDate();
View Full Code Here

      if (null == spDocument.getParentList()) {
        String message = "Parent List for the document is not found. docURL [ "
            + spDocument.getUrl();

        LOGGER.log(Level.WARNING, message);
        throw new SkippedDocumentException("Document skipped. " + message);
      }
    } while (!spDocument.isToBeFed());

    // for deleted documents, no need to use alias mapping. Only DocID
    // is sufficient.
View Full Code Here

  @Override
  public Property findProperty(final String strPropertyName)
      throws RepositoryException {
    if (!sharepointClientContext.isPushAcls() &&
        documentType == DocumentType.ACL) {
      throw new SkippedDocumentException(
          "This should not happen here, isToBeFed() = " + isToBeFed()
          + ". Skipping document [" + url
          + "] as DocumentType is ACL and PushAcls is false.");
    }
    final Collator collator = Util.getCollator();
View Full Code Here

          // Since the mimetype is in list of 'ignored' mimetype
          // list, mark it to be skipped from sending
          String msg = new StringBuffer("Skipping the document with docId : ").append(getDocId()).append(" doc URL: ").append(getUrl()).append(" as the mimetype is in the 'ignored' mimetypes list ").toString();
          // Log it to the excluded_url log
          sharepointClientContext.logExcludedURL(msg);
          throw new SkippedDocumentException(msg);
        }
      }
    }

    return new SPContent(SPConstants.CONNECTIVITY_SUCCESS, responseCode,
View Full Code Here

        if (supportLevel > 0 && len > 0 &&
            len <= traversalContext.maxDocumentSize()) {
          return file.getInputStream();
        } else {
          if (supportLevel < 0) {
            throw new SkippedDocumentException("Skipping file " + docid
                + " - excluded MIME type: " + mimeType);
          } else if (supportLevel == 0) {
            LOGGER.log(Level.FINER, "Returning no content for file {0}"
                + " - unsupported MIME type: {1}",
                new Object[] { docid, mimeType });
View Full Code Here

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

      } else if (mimeTypeSupportLevel < 0) {
        String msg = new StringBuilder("Skipping the document with docId: ")
            .append(objectId).append(" as the MIME type ").append(mimeType)
            .append(" is in the 'ignored' MIME types list.").toString();
        LOG.warning(msg);
        throw new SkippedDocumentException(msg);
      }
    }
    return false;
  }
View Full Code Here

    } else if (SpiConstants.PROPNAME_FRAGMENT.equals(name)) {
      return new SimpleProperty(Value.getStringValue(EXTRACTED_ACL_FRAGMENT));
    } else if (SpiConstants.PROPNAME_ACLINHERITANCETYPE.equals(name)) {
      String inheritanceType = Value.getSingleValueString(source, name);
      if (AclInheritanceType.AND_BOTH_PERMIT.toString().equals(inheritanceType)) {
        throw new SkippedDocumentException(
            "Extracting 'and-both-permit' ACLs is not supported.");
      }
      return new SimpleProperty(Value.getStringValue(
          Strings.isNullOrEmpty(inheritanceType) ?
          AclInheritanceType.PARENT_OVERRIDES.toString() : inheritanceType));
View Full Code Here

         Where.DOCUMENT_CONTENT, 2, 1);
  }

  public void testSkipDocumentException() {
    checkExceptionHandling(
         new SkippedDocumentException("SkippedDocumentException"),
         Where.DOCUMENT_CONTENT, 2, 1);
  }
View Full Code Here

TOP

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

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.