Package com.google.enterprise.connector.spi.SpiConstants

Examples of com.google.enterprise.connector.spi.SpiConstants.FeedType


    checkSubmissions();

    // Apply any configured Document filters to the document.
    document = documentFilterFactory.newDocumentFilter(document);

    FeedType feedType;
    try {
      feedType = DocUtils.getFeedType(document);
    } catch (RuntimeException e) {
      LOGGER.log(Level.WARNING,
          "Rethrowing RuntimeException as RepositoryDocumentException", e);
      throw new RepositoryDocumentException(e);
    }

    // All feeds in a feed file must be of the same type.
    // If the feed would change type, send the feed off to the GSA
    // and start a new one.
    // TODO: Fix this check to allow ACLs in any type feed.
    if (xmlFeed != null && !feedType.isCompatible(xmlFeed.getFeedType())) {
      if (LOGGER.isLoggable(Level.FINE)) {
        LOGGER.fine("A new feedType, " + feedType + ", requires a new feed for "
            + connectorName + ". Closing feed and sending to GSA.");
      }
      submitFeed();
View Full Code Here


   * Illegal values for feed type will be ignored and the default behavior will
   * be used.
   */
  public static FeedType getFeedType(Document document)
      throws RepositoryException {
    FeedType feedType = null;
    String feedTypeValue =
        getOptionalString(document, SpiConstants.PROPNAME_FEEDTYPE);
    if (feedTypeValue != null) {
      try {
        return FeedType.valueOf(feedTypeValue.toUpperCase());
View Full Code Here

   *
   * @param feedTypeString the String representation of a
   *        {@link SpiConstants.FeedType}
   */
  public void setFeedType(String feedTypeString) {
    FeedType type;
    try {
      type = Enum.valueOf(FeedType.class, feedTypeString.toUpperCase());
      if (type != FeedType.CONTENT && type != FeedType.CONTENTURL) {
        LOGGER.warning("Unsupported FeedType: " + feedTypeString);
        type = FeedType.CONTENT;
      }
    } catch (IllegalArgumentException e) {
      LOGGER.warning("Unknown FeedType: " + feedTypeString);
      type = FeedType.CONTENT;
    }
    if (LOGGER.isLoggable(Level.CONFIG))
      LOGGER.config("FEED TYPE: " + type.toString());
    this.feedType = type;
  }
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.spi.SpiConstants.FeedType

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.