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

jvergara
19.09.2008 a9ded45b0acdc5bcdee105036d1e36f31a16f05c
refs
author jvergara <jvergara@localhost>
Wednesday, March 19, 2008 19:09 +0100
committer jvergara <jvergara@localhost>
Wednesday, March 19, 2008 19:09 +0100
commita9ded45b0acdc5bcdee105036d1e36f31a16f05c
tree a4be8b9d50d60aaf4cff010a2997d2b5dd5a2dfd tree | zip | gz
parent 20a7683b8569474f0cf3ab1ac95c704e37f7314b 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
opendj-sdk/opends/src/messages/messages/dsconfig.properties 15 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/admin/condition/ContainsCondition.java 21 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/ToolConstants.java 12 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/CreateSubCommandHandler.java 308 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/DSConfig.java 249 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/DeleteSubCommandHandler.java 16 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/GetPropSubCommandHandler.java 9 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/HelpSubCommandHandler.java 11 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/InternalManagementContextFactory.java 9 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/LDAPManagementContextFactory.java 13 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ListSubCommandHandler.java 6 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/ManagementContextFactory.java 9 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/PropertyEditorModification.java 198 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/PropertyValueEditor.java 372 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/SetPropSubCommandHandler.java 188 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/dsconfig/SubCommandHandler.java 106 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/util/args/ArgumentParser.java 4 ●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/util/cli/CommandBuilder.java 287 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/util/cli/LDAPConnectionConsoleInteraction.java 148 ●●●●● diff | view | raw | blame | history