summaryrefslogtreecommitdiffstats
path: root/base/java-tools/src/com/netscape/cmstools/cert/CertShowCLI.java
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2013-08-06 02:29:50 -0400
committerEndi S. Dewata <edewata@redhat.com>2013-08-23 23:17:21 -0400
commitccb8d7148fc4f50fa9d949edb4f47ad6742af2bc (patch)
tree376f44c0eaa0a39c4787fb8bf09aa9ddfd85eeac /base/java-tools/src/com/netscape/cmstools/cert/CertShowCLI.java
parent752166224154243f93fad5ea10dd4ebd87e1c369 (diff)
downloadpki-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/cert/CertShowCLI.java')
-rw-r--r--base/java-tools/src/com/netscape/cmstools/cert/CertShowCLI.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/cert/CertShowCLI.java b/base/java-tools/src/com/netscape/cmstools/cert/CertShowCLI.java
index 798514814..d1d6132ae 100644
--- a/base/java-tools/src/com/netscape/cmstools/cert/CertShowCLI.java
+++ b/base/java-tools/src/com/netscape/cmstools/cert/CertShowCLI.java
@@ -34,15 +34,15 @@ import com.netscape.cmstools.cli.MainCLI;
*/
public class CertShowCLI extends CLI {
- public CertCLI parent;
+ public CertCLI certCLI;
- public CertShowCLI(CertCLI parent) {
- super("show", "Show certificate");
- this.parent = parent;
+ public CertShowCLI(CertCLI certCLI) {
+ super("show", "Show certificate", certCLI);
+ this.certCLI = certCLI;
}
public void printHelp() {
- formatter.printHelp(parent.name + "-" + name + " <Serial Number> [OPTIONS...]", options);
+ formatter.printHelp(getFullName() + " <Serial Number> [OPTIONS...]", options);
}
public void execute(String[] args) throws Exception {
@@ -78,7 +78,7 @@ public class CertShowCLI extends CLI {
CertId certID = new CertId(cmdArgs[0]);
String file = cmd.getOptionValue("output");
- CertData certData = parent.client.getCert(certID);
+ CertData certData = certCLI.certClient.getCert(certID);
String encoded = certData.getEncoded();
if (encoded != null && file != null) {