diff options
author | Endi S. Dewata <edewata@redhat.com> | 2013-08-06 02:29:50 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2013-08-23 23:17:21 -0400 |
commit | ccb8d7148fc4f50fa9d949edb4f47ad6742af2bc (patch) | |
tree | 376f44c0eaa0a39c4787fb8bf09aa9ddfd85eeac /base/java-tools/src/com/netscape/cmstools/key/KeyRequestFindCLI.java | |
parent | 752166224154243f93fad5ea10dd4ebd87e1c369 (diff) | |
download | pki-ccb8d7148fc4f50fa9d949edb4f47ad6742af2bc.tar.gz pki-ccb8d7148fc4f50fa9d949edb4f47ad6742af2bc.tar.xz pki-ccb8d7148fc4f50fa9d949edb4f47ad6742af2bc.zip |
Refactored CLI framework.
Some common CLI methods and attributes have been refactored into the CLI base
class. A new SubsystemCLI class was added as the base for subsystem CLI
modules. The MainCLI was modified such that it will only perform authentication
if the subsystem is specified in the server URI. If no subsystem is specified
in the URI, the authentication will be done by the subsystem CLI module.
Ticket #701
Diffstat (limited to 'base/java-tools/src/com/netscape/cmstools/key/KeyRequestFindCLI.java')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/key/KeyRequestFindCLI.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/key/KeyRequestFindCLI.java b/base/java-tools/src/com/netscape/cmstools/key/KeyRequestFindCLI.java index 83ce42318..14770efdb 100644 --- a/base/java-tools/src/com/netscape/cmstools/key/KeyRequestFindCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/key/KeyRequestFindCLI.java @@ -35,15 +35,15 @@ import com.netscape.cmstools.cli.MainCLI; */ public class KeyRequestFindCLI extends CLI { - public KeyCLI parent; + public KeyCLI keyCLI; - public KeyRequestFindCLI(KeyCLI parent) { - super("request-find", "Find key requests"); - this.parent = parent; + public KeyRequestFindCLI(KeyCLI keyCLI) { + super("request-find", "Find key requests", keyCLI); + this.keyCLI = keyCLI; } public void printHelp() { - formatter.printHelp(parent.name + "-" + name + " [OPTIONS...]", options); + formatter.printHelp(getFullName() + " [OPTIONS...]", options); } public void execute(String[] args) { @@ -95,7 +95,7 @@ public class KeyRequestFindCLI extends CLI { s = cmd.getOptionValue("maxTime"); Integer maxTime = s == null ? null : Integer.valueOf(s); - KeyRequestInfos keys = parent.keyClient.findKeyRequests( + KeyRequestInfos keys = keyCLI.keyClient.findKeyRequests( status, type, clientID, start, pageSize, maxResults, maxTime); Collection<KeyRequestInfo> entries = keys.getRequests(); |