diff options
| author | Endi S. Dewata <edewata@redhat.com> | 2014-02-27 00:02:59 -0500 |
|---|---|---|
| committer | Endi S. Dewata <edewata@redhat.com> | 2014-03-07 18:18:01 -0500 |
| commit | 60134cccd26eb872636427afe3fe1c07a253627f (patch) | |
| tree | b84f18f55c6dad92b81fc004359651d3228cf991 /base/java-tools/src | |
| parent | 8f1f54ce9817cc196f5b4fb77ab5361f2497de9a (diff) | |
| download | pki-60134cccd26eb872636427afe3fe1c07a253627f.tar.gz pki-60134cccd26eb872636427afe3fe1c07a253627f.tar.xz pki-60134cccd26eb872636427afe3fe1c07a253627f.zip | |
Cleaned up CLI command list.
The CLI help message has been simplified to show the commands as
a single list.
Ticket #839
Diffstat (limited to 'base/java-tools/src')
| -rw-r--r-- | base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java b/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java index 2c2ce4d33..54524d3c9 100644 --- a/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/cli/MainCLI.java @@ -63,20 +63,21 @@ public class MainCLI extends CLI { public MainCLI() throws Exception { super("pki", "PKI command-line interface"); - addModule(new CACLI(this)); - addModule(new KRACLI(this)); - addModule(new OCSPCLI(this)); - addModule(new TKSCLI(this)); - addModule(new TPSCLI(this)); + addModule(new HelpCLI(this)); addModule(new ClientCLI(this)); - addModule(new HelpCLI(this)); addModule(new ProxyCLI(new CertCLI(this), "ca")); addModule(new ProxyCLI(new GroupCLI(this), "ca")); addModule(new ProxyCLI(new KeyCLI(this), "kra")); addModule(new ProxyCLI(new SecurityDomainCLI(this), "ca")); addModule(new ProxyCLI(new UserCLI(this), "ca")); + + addModule(new CACLI(this)); + addModule(new KRACLI(this)); + addModule(new OCSPCLI(this)); + addModule(new TKSCLI(this)); + addModule(new TPSCLI(this)); } public String getFullModuleName(String moduleName) { @@ -96,29 +97,9 @@ public class MainCLI extends CLI { int leftPadding = 1; int rightPadding = 25; - System.out.println("Subsystems:"); - - for (CLI module : modules.values()) { - if (!(module instanceof SubsystemCLI)) continue; - - String label = module.getFullName(); - - int padding = rightPadding - leftPadding - label.length(); - if (padding < 1) - padding = 1; - - System.out.print(StringUtils.repeat(" ", leftPadding)); - System.out.print(label); - System.out.print(StringUtils.repeat(" ", padding)); - System.out.println(module.getDescription()); - } - - System.out.println(); System.out.println("Commands:"); for (CLI module : modules.values()) { - if (module instanceof SubsystemCLI) continue; - String label = module.getFullName(); int padding = rightPadding - leftPadding - label.length(); |
