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/profile/ProfileModifyCLI.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/profile/ProfileModifyCLI.java')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/profile/ProfileModifyCLI.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/profile/ProfileModifyCLI.java b/base/java-tools/src/com/netscape/cmstools/profile/ProfileModifyCLI.java index 5259a7fe7..e1c543672 100644 --- a/base/java-tools/src/com/netscape/cmstools/profile/ProfileModifyCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/profile/ProfileModifyCLI.java @@ -13,15 +13,15 @@ import com.netscape.cmstools.cli.MainCLI; public class ProfileModifyCLI extends CLI { - public ProfileCLI parent; + public ProfileCLI profileCLI; - public ProfileModifyCLI(ProfileCLI parent) { - super("mod", "Modify profiles"); - this.parent = parent; + public ProfileModifyCLI(ProfileCLI profileCLI) { + super("mod", "Modify profiles", profileCLI); + this.profileCLI = profileCLI; } public void printHelp() { - formatter.printHelp(parent.name + "-" + name + " <file>", options); + formatter.printHelp(getFullName() + " <file>", options); } public void execute(String[] args) { @@ -51,7 +51,7 @@ public class ProfileModifyCLI extends CLI { try { ProfileData data = ProfileCLI.readProfileFromFile(filename); - parent.client.modifyProfile(data); + profileCLI.profileClient.modifyProfile(data); MainCLI.printMessage("Modified profile " + data.getId()); } catch (FileNotFoundException | JAXBException e) { System.err.println("Error: " + e.getMessage()); |