Package com.google.enterprise.connector.spi

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


   */
  static TypeInfo fromSpringResourceAndThrow(Resource r)
      throws FactoryCreationFailureException, BeanListFailureException, NoBeansFoundException,
      BeanInstantiationFailureException, InstanceXmlFailureException, InstanceXmlMissingException {
    String connectorTypeName = null;
    ConnectorType connectorType = null;
    Resource connectorInstancePrototype = null;
    Resource connectorDefaultPrototype = null;

    // Make a bean factory from the resource.
    XmlBeanFactory factory;
View Full Code Here


      String typeName = connectorStatus.getType();
      ServletUtil.writeXMLElement(out, 3, ServletUtil.XMLTAG_CONNECTOR_TYPE,
          typeName);
      String version = null;
      try {
        ConnectorType connectorType = manager.getConnectorType(typeName);
        version = JarUtils.getJarVersion(connectorType.getClass());
      } catch (ConnectorTypeNotFoundException e) {
        // The JUnit tests might not have actual ConnectorTypes.
        LOGGER.warning("Connector type not found: " + typeName);
      }
      if (version != null && version.length() > 0) {
View Full Code Here

   */
  @Override
  public synchronized ConfigureResponse getConfigForm(Locale locale)
      throws ConnectorNotFoundException, InstantiatorException {
    Configuration config = getConnectorConfiguration();
    ConnectorType connectorType = typeInfo.getConnectorType();
    try {
      ConfigureResponse response;
      // If config is null, the connector was deleted behind our back.
      // Treat this a new connector configuration.
      if (config == null) {
        response = connectorType.getConfigForm(locale);
        if (response != null) {
          return new ExtendedConfigureResponse(response,
              getConnectorInstancePrototype(name, typeInfo));
        }
      } else {
        if (LOGGER.isLoggable(Level.CONFIG)) {
          LOGGER.config("GET POPULATED CONFIG FORM: locale = " + locale
                        + ", configuration = "
                        + SecurityUtils.getMaskedMap(config.getMap()));
        }
        response =
            connectorType.getPopulatedConfigForm(config.getMap(), locale);
        if (response != null) {
          return new ExtendedConfigureResponse(response, config);
        }
      }
      return response;
View Full Code Here

    ServletUtil.writeStatusId(out, ConnectorMessageCode.SUCCESS);
    ServletUtil.writeXMLTag(out, 1, ServletUtil.XMLTAG_CONNECTOR_TYPES, false);
    for (String typeName : connectorTypes) {
      String version = null;
      try {
        ConnectorType connectorType = manager.getConnectorType(typeName);
        version = JarUtils.getJarVersion(connectorType.getClass());
      } catch (ConnectorTypeNotFoundException e) {
        // The JUnit tests might not have actual ConnectorTypes.
        LOGGER.warning("Connector type not found: " + typeName);
      }
      if (version != null && version.length() > 0) {
View Full Code Here

  @Override
  public ConfigureResponse getConfigForm(String connectorTypeName,
      String language)
      throws ConnectorTypeNotFoundException, InstantiatorException {
    ConnectorType connectorType =
        instantiator.getConnectorType(connectorTypeName);
    Locale locale = I18NUtil.getLocaleFromStandardLocaleString(language);
    if (LOGGER.isLoggable(Level.CONFIG)) {
      LOGGER.config("GET CONFIG FORM: Fetching configuration form for connector"
                  + " type " + connectorTypeName + ", locale = " + locale);
    }
    ConfigureResponse response;
    try {
      response = connectorType.getConfigForm(locale);
    } catch (Exception e) {
      throw new InstantiatorException("Failed to get configuration form.", e);
    }

    // Include the connectorInstance.xml in the response.
View Full Code Here

  }

  /** Test getConnectorType. */
  public void testGetConnectorType() throws Exception {
    String typeName = instantiator.getConnectorTypeName(connectorName);
    ConnectorType type = manager.getConnectorType(typeName);
    assertNotNull(type);
    assertEquals(instantiator.getConnectorType(connectorName), type);
  }
View Full Code Here

TOP

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

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.