mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
02.05.2007 e4bda951f24517dd0aa2ab3c7671e179785c3faa
opends/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java
@@ -263,7 +263,23 @@
  public void run()
          throws ArgumentException
  {
    boolean secureConnection =
    run(true, true);
  }
  /**
   * Interact with the user though the console to get information
   * necessary to establish an LDAP connection.
   * @param canUseSSL whether we can propose to connect using SSL or not.
   * @param canUseStartTLS whether we can propose to connect using Start TLS or
   * not.
   *
   * @throws ArgumentException if there is a problem with the arguments
   */
  public void run(boolean canUseSSL, boolean canUseStartTLS)
          throws ArgumentException
  {
    boolean secureConnection = (canUseSSL || canUseStartTLS) &&
      (
          secureArgsList.useSSLArg.isPresent()
          ||
@@ -382,6 +398,14 @@
        {
          continue ;
        }
        if (!canUseSSL && p.equals(Protocols.SSL))
        {
          continue;
        }
        if (!canUseStartTLS && p.equals(Protocols.START_TLS))
        {
          continue;
        }
        int i = builder.addNumberedOption(p.getMenuMessage(), MenuResult
            .success(p.getChoice()));
        if (p.equals(defaultProtocol))
@@ -1083,6 +1107,16 @@
  }
  /**
   * Sets the port number name that should be used for connections based on
   * this interaction.
   *
   * @param portNumber port number for connections
   */
  public void setPortNumber(int portNumber) {
    this.portNumber = portNumber;
  }
  /**
   * Gets the bind DN name that should be used for connections based on
   * this interaction.
   *