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

Jean-Noel Rouvignac
03.55.2015 a39783c0d0b94e6eef5e7836168d919442c77f56
refs
author Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, February 3, 2015 14:55 +0100
committer Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Tuesday, February 3, 2015 14:55 +0100
commita39783c0d0b94e6eef5e7836168d919442c77f56
tree fe65d02fe28b82786eb3c2efdaa805e11f7e83cc tree | zip | gz
parent 97da025467222db4ffa4a997a26e92b5e9aa3ad9 view | diff
OPENDJ-1778 Tools --help display the java class name instead of the command name

This is a problem since switching to using the opendj-cli argument classes.
This happens because the opendj-cli tools check the new "com.forgerock.opendj.ldap.tools.scriptName" property instead of the opends property "org.opends.server.scriptName" that is still set by the server tools.
Fixed by also checking the legacy opends property.
Factorized the code from ArgumentParser, SubCommandArgumentParser and DSConfig.


ArgumentParser.java:
Added constant PROPERTY_SCRIPT_NAME_LEGACY.
Extracted methods getScriptNameOrJava(), getLocalizableScriptName() and getScriptName().
3 files modified
89 ■■■■■ changed files
opendj-cli/src/main/java/com/forgerock/opendj/cli/ArgumentParser.java 54 ●●●● diff | view | raw | blame | history
opendj-cli/src/main/java/com/forgerock/opendj/cli/SubCommandArgumentParser.java 27 ●●●●● diff | view | raw | blame | history
opendj-config/src/main/java/org/forgerock/opendj/config/dsconfig/DSConfig.java 8 ●●●● diff | view | raw | blame | history