Package com.google.enterprise.connector.spi

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


  private ConfigureResponse makeValidatedForm(
      final Map<String, String> configMap, final ErrorDignostics ed) {
    if (configMap == null) {
      LOGGER.warning("configMap is not found");
      if (rb != null) {
        return new ConfigureResponse(rb.getString("CONFIGMAP_NOT_FOUND"), "");
      } else {
        return new ConfigureResponse("resource bundle not found", "");
      }
    }
    return new ConfigureResponse(ed.error_message,
        makeConfigForm(configMap, ed));
  }
View Full Code Here


   */
  public ConfigureResponse getConfigForm(final Locale locale) {
    LOGGER.config("Locale " + locale);
    this.editMode = false;
    rb = ResourceBundle.getBundle("SharepointConnectorResources", locale);
    return new ConfigureResponse("", makeConfigForm(null, null));
  }
View Full Code Here

    LOGGER.config("Locale " + locale);
    String isSelected = configMap.get(SPConstants.PUSH_ACLS);
    this.editMode =
        (null != isSelected && !isSelected.equalsIgnoreCase(SPConstants.TRUE));
    rb = ResourceBundle.getBundle("SharepointConnectorResources", locale);
    return new ConfigureResponse("", makeConfigForm(configMap, null));
  }
View Full Code Here

    final ErrorDignostics ed = new ErrorDignostics();
    if (validateConfigMap(configData, ed)) {
      // all is ok
      return null;
    }
    final ConfigureResponse configureResponse = makeValidatedForm(configData,
        ed);

    LOGGER.config("message: " + configureResponse.getMessage());
    return configureResponse;
  }
View Full Code Here

        configuration = configuration.replace("$standard", conf.get(s).equals("SSL") ? "" : "selected='selected'");
      } else {
        configuration = configuration.replace("$" + s, xmlEscape(conf.get(s)));
      }
    }
    return new ConfigureResponse("", configuration);
  }
View Full Code Here

              + e.getMessage(), e);
        }
      }
    }

    return success ? null : new ConfigureResponse(
        "Error creating AD connector", form.toString(), conf);
  }
View Full Code Here

  /** This is the name of the input used in the HTML form. */
  public static final String FEEDURL_KEY = "feedUrl";
 
  /** {@inheritDoc} */
  public ConfigureResponse getConfigForm(Locale locale) {
    return new ConfigureResponse("", makeForm(null, locale));   
  }
View Full Code Here

  }
 
  /** {@inheritDoc} */
  public ConfigureResponse getPopulatedConfigForm(Map configMap,
      Locale locale) {
    return new ConfigureResponse("", makeForm(configMap, locale));
  }
View Full Code Here

   */
  public ConfigureResponse validateConfig(Map configMap, Locale locale) {
    if (isValid(configMap)) {
      return null;
    } else {
      return new ConfigureResponse(getString("invalid_feed_url", locale),
          makeForm(configMap, locale));
    }
  }
View Full Code Here

    }
    assertEquals("Open tags at end of input", 0, stack.size());
  }

  public void testGetConfigForm() {
    ConfigureResponse response = type.getConfigForm(Locale.getDefault());
    assertEquals("", response.getMessage());
    assertBalancedTags(response.getFormSnippet());
  }
View Full Code Here

TOP

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

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.