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

Gaetan Boismal
24.51.2015 99f943f6575fec2ff44ac4b77947e60edad5ca5e
OPENDJ-1887 OPENDJ-435 Add default baseDN in setup

* InstallDS.java
** Add baseDNs argument default value on the fly when user is about to be prompted.

* Installation.java
** Add default base DN constant (dc=example,dc=com)
2 files modified
10 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/quicksetup/Installation.java 5 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/InstallDS.java 5 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/quicksetup/Installation.java
@@ -302,7 +302,10 @@
  public static final String[] REQUIRED_DIRECTORIES = new String[] {
      CONFIG_PATH_RELATIVE, DATABASES_PATH_RELATIVE, LIBRARIES_PATH_RELATIVE };
  /**
   * The default base DN prompted to user in setup interactive mode.
   */
  public static final String DEFAULT_INTERACTIVE_BASE_DN = "dc=example,dc=com";
  /**
   * Performs validation on the specified file to make sure that it is an actual
opendj-server-legacy/src/main/java/org/opends/server/tools/InstallDS.java
@@ -1243,6 +1243,11 @@
      return NewSuffixOptions.createEmpty(new LinkedList<String>());
    }
    // Add default value for base DN on first prompt
    if (argParser.baseDNArg.getDefaultValue() == null)
    {
      argParser.baseDNArg.setDefaultValue(Installation.DEFAULT_INTERACTIVE_BASE_DN);
    }
    // Check the validity of the base DNs
    final List<String> baseDNs = promptIfRequiredForDNs(argParser.baseDNArg, INFO_INSTALLDS_PROMPT_BASEDN.get(), true);
    return promptIfRequiredForDataOptions(baseDNs);