Package com.google.enterprise.connector.ldap.LdapHandler

Examples of com.google.enterprise.connector.ldap.LdapHandler.LdapConnectionSettings


  private static LdapConnectionSettings makeLdapConnectionSettings() {
    Method method = Method.STANDARD;
    String hostname = LdapHandlerTest.getHostname();
    int port = 389;
    String baseDN = LdapHandlerTest.getTestProperties().getProperty("basedn");
    LdapConnectionSettings settings;
    if (Strings.isNullOrEmpty(TEST_USER)
        || Strings.isNullOrEmpty(TEST_PASSWORD)) {
      settings = new LdapConnectionSettings(method, hostname, port, baseDN);
    } else {
      settings = new LdapConnectionSettings(method, hostname, port, baseDN,
          AuthType.SIMPLE, TEST_USER, TEST_PASSWORD);
    }
    return settings;
  }
View Full Code Here


  private static LdapConnectionSettings makeInvalidLdapConnectionSettings() {
    Method method = Method.STANDARD;
    String hostname = "not-ldap.xyzzy.foo";
    int port = 389;
    String baseDN = LdapHandlerTest.getTestProperties().getProperty("basedn");
    LdapConnectionSettings settings =
        new LdapConnectionSettings(method, hostname, port, baseDN);
    return settings;
  }
View Full Code Here

  private static LdapConnectionSettings makeBadPwdLdapConnectionSettings() {
    String hostname = getBadPwdHostname();
    int port = 389;
    String baseDN = getBadPwdBindingdn();
    String password = "wrongpassword";
    LdapConnectionSettings settings =
        new LdapConnectionSettings(Method.STANDARD, hostname, port, baseDN,
            AuthType.SIMPLE, baseDN, password);
    return settings;
  }
View Full Code Here

    Method method = Method.STANDARD;
    // hostname needs to be valid but unreachable and times out for this test
    String hostname = getTimeoutHostname();
    int port = 389;
    String baseDN = LdapHandlerTest.getTestProperties().getProperty("basedn");
    LdapConnectionSettings settings =
        new LdapConnectionSettings(method, hostname, port, baseDN);
    return settings;
 
View Full Code Here

    this.schemaKey = schemaKey;
    this.filter = filter;
    this.schema = schema;

    this.settings =
        new LdapConnectionSettings(this.method, this.hostname, this.port, this.basedn,
        this.authtype, this.username, this.password);
    LOG.fine("this.settings: " + this.settings);

    // only create an LdapRule if one was supplied
    this.rule = (this.filter == null) ? null : new LdapRule(Scope.SUBTREE, this.filter);
View Full Code Here

        LOG.info("FormManager selectedAttributes size:" + selectedAttributes.size()
            + " contents:" + string);
      }
      schemaField.setSelectedKeys(selectedAttributes);

      LdapConnectionSettings settings = ldapConnectorConfig.getSettings();

      // Note: we ignore connection errors here, because we just want to
      // set up the state in the way it was when it was saved
      try {
        ldapHandler.setLdapConnectionSettings(settings);
View Full Code Here

        }
      }
      LOG.fine("Simple Authentication validation successful!");
     
      LdapConnectorConfig ldapConnectorConfig = new LdapConnectorConfig(config);
      LdapConnectionSettings settings = ldapConnectorConfig.getSettings();
      ldapHandler.setLdapConnectionSettings(settings);

      // report any connection errors
      Map<LdapConnectionError, String> errors = ldapHandler.getErrors();
      if (errors.size() > 0) {
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.ldap.LdapHandler.LdapConnectionSettings

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.