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

matthew_swift
23.55.2007 802263ae38d5d54acdd4945dbbce39c5f6bd26eb
opends/src/server/org/opends/server/tools/dsconfig/SubCommandHandler.java
@@ -482,6 +482,11 @@
  }
  /**
   * The value for the long option advanced.
   */
  private static final String OPTION_DSCFG_LONG_ADVANCED = "advanced";
  /**
   * The value for the long option property.
   */
  private static final String OPTION_DSCFG_LONG_PROPERTY = "property";
@@ -502,6 +507,11 @@
  private static final String OPTION_DSCFG_LONG_UNIT_TIME = "unit-time";
  /**
   * The value for the short option advanced.
   */
  private static final Character OPTION_DSCFG_SHORT_ADVANCED = null;
  /**
   * The value for the short option property.
   */
  private static final Character OPTION_DSCFG_SHORT_PROPERTY = null;
@@ -521,6 +531,9 @@
   */
  private static final char OPTION_DSCFG_SHORT_UNIT_TIME = 'M';
  // The argument which should be used to request advanced mode.
  private BooleanArgument advancedModeArgument;
  // The argument which should be used to specify zero or more
  // property names.
  private StringArgument propertyArgument;
@@ -809,6 +822,22 @@
  /**
   * Determines whether the user requested advanced mode.
   *
   * @return Returns <code>true</code> if the user requested
   *         advanced mode.
   */
  protected final boolean isAdvancedMode() {
    if (advancedModeArgument != null) {
      return advancedModeArgument.isPresent();
    } else {
      return false;
    }
  }
  /**
   * Determines whether the user requested record-mode.
   *
   * @return Returns <code>true</code> if the user requested
@@ -825,6 +854,29 @@
  /**
   * Registers the advanced mode argument with the sub-command.
   *
   * @param subCommand
   *          The sub-command.
   * @param descriptionID
   *          The usage description message ID to be used for the
   *          argument.
   * @param args
   *          The arguments for the usage description.
   * @throws ArgumentException
   *           If the advanced mode argument could not be registered.
   */
  protected final void registerAdvancedModeArgument(SubCommand subCommand,
      int descriptionID, String... args) throws ArgumentException {
    this.advancedModeArgument = new BooleanArgument(OPTION_DSCFG_LONG_ADVANCED,
        OPTION_DSCFG_SHORT_ADVANCED, OPTION_DSCFG_LONG_ADVANCED, descriptionID,
        (Object[]) args);
    subCommand.addArgument(advancedModeArgument);
  }
  /**
   * Registers the property name argument with the sub-command.
   *
   * @param subCommand