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

jvergara
19.09.2008 13a63611d24de8c5727e62a215b26354c1a22278
refs
author jvergara <jvergara@localhost>
Wednesday, March 19, 2008 19:09 +0100
committer jvergara <jvergara@localhost>
Wednesday, March 19, 2008 19:09 +0100
commit13a63611d24de8c5727e62a215b26354c1a22278
tree e3eb5902fc7b66a4b1cce64a78af2a9a405f4b4a tree | zip | gz
parent f1525316829c9189821c8c88cebfe4e688912e4f view | diff
Fix for issue 2197 (dsconfig: interactive mode should display the effective dsconfig command)

After discussing with different members the following has been committed:

* The current behavior is kept (no additional output by default).

* Two new options have been added:
--displayEquivalentCommand
Display the equivalent non-interactive argument in the standard output when
this command is run in interactive mode
--equivalentCommandFilePath {path}
The full path to the file where the equivalent non-interactive
commands will be written when this command is run in interactive mode


So the user will have to explicitly ask to display the equivalent command-line (or to dump it to a file). This approach privileges the users that configure the server using interactive dsconfig instead of those whose ultimate goal is to create scripts to configure the server (and to whom this feature is targetted).

In terms of implementation basically what is done is to create a new class called CommandBuilder when we store the equivalent arguments to what the user provides interactively. When the user applies a change (or asks to display a list of objects) the equivalent command-line is displayed by using the contents stored in the CommandBuilder object.
2 files added
17 files modified
1981 ■■■■■ changed files
opends/src/messages/messages/dsconfig.properties 15 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/admin/condition/ContainsCondition.java 21 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/ToolConstants.java 12 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java 308 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/DSConfig.java 249 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java 16 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/GetPropSubCommandHandler.java 9 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java 11 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/InternalManagementContextFactory.java 9 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java 13 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/ListSubCommandHandler.java 6 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/ManagementContextFactory.java 9 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/PropertyEditorModification.java 198 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java 372 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java 188 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/tools/dsconfig/SubCommandHandler.java 106 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/util/args/ArgumentParser.java 4 ●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/util/cli/CommandBuilder.java 287 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java 148 ●●●●● diff | view | raw | blame | history