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/ProfileRemoveCLI.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/ProfileRemoveCLI.java')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/profile/ProfileRemoveCLI.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/profile/ProfileRemoveCLI.java b/base/java-tools/src/com/netscape/cmstools/profile/ProfileRemoveCLI.java index c2e3eae53..92c99ede8 100644 --- a/base/java-tools/src/com/netscape/cmstools/profile/ProfileRemoveCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/profile/ProfileRemoveCLI.java @@ -5,15 +5,15 @@ import com.netscape.cmstools.cli.MainCLI; public class ProfileRemoveCLI extends CLI { - public ProfileCLI parent; + public ProfileCLI profileCLI; - public ProfileRemoveCLI(ProfileCLI parent) { - super("del", "Remove profiles"); - this.parent = parent; + public ProfileRemoveCLI(ProfileCLI profileCLI) { + super("del", "Remove profiles", profileCLI); + this.profileCLI = profileCLI; } public void printHelp() { - formatter.printHelp(parent.name + "-" + name + " <profile_id>", options); + formatter.printHelp(getFullName() + " <Profile ID>", options); } public void execute(String[] args) throws Exception { @@ -25,7 +25,7 @@ public class ProfileRemoveCLI extends CLI { String profileId = args[0]; - parent.client.deleteProfile(profileId); + profileCLI.profileClient.deleteProfile(profileId); MainCLI.printMessage("Deleted profile \"" + profileId + "\""); } |