diff options
author | Endi S. Dewata <edewata@redhat.com> | 2014-08-25 10:27:09 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2014-08-26 11:04:02 -0400 |
commit | 8e464b6ba5d83d7915978db5841967f20672dfd0 (patch) | |
tree | 36662b6cec8b52bbcab68abc8612574924161514 /base/java-tools | |
parent | 20b9d956aab21a5a2a61162e6c88fbee5828a9e9 (diff) | |
download | pki-8e464b6ba5d83d7915978db5841967f20672dfd0.tar.gz pki-8e464b6ba5d83d7915978db5841967f20672dfd0.tar.xz pki-8e464b6ba5d83d7915978db5841967f20672dfd0.zip |
Fixed problem emptying a field in TPS UI.
Previously emptying a field in TPS UI could not be saved because
the change was not saved and sent to the server. The UI framework
now has been fixed to save and send the empty field to the server
such that the database can be updated properly.
Additional parameters have been added to the tps-token-mod command
to modify all editable fields.
Ticket #1085
Diffstat (limited to 'base/java-tools')
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/tps/token/TokenCLI.java | 2 | ||||
-rw-r--r-- | base/java-tools/src/com/netscape/cmstools/tps/token/TokenModifyCLI.java | 25 |
2 files changed, 23 insertions, 4 deletions
diff --git a/base/java-tools/src/com/netscape/cmstools/tps/token/TokenCLI.java b/base/java-tools/src/com/netscape/cmstools/tps/token/TokenCLI.java index 40d1f9447..e7dd6a308 100644 --- a/base/java-tools/src/com/netscape/cmstools/tps/token/TokenCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/tps/token/TokenCLI.java @@ -52,7 +52,7 @@ public class TokenCLI extends CLI { public static void printToken(TokenData token) { System.out.println(" Token ID: " + token.getID()); if (token.getUserID() != null) System.out.println(" User ID: " + token.getUserID()); - if (token.getType() != null) System.out.println(" Status: " + token.getType()); + if (token.getType() != null) System.out.println(" Type: " + token.getType()); if (token.getStatus() != null) System.out.println(" Status: " + token.getStatus()); if (token.getAppletID() != null) System.out.println(" Applet ID: " + token.getAppletID()); if (token.getKeyInfo() != null) System.out.println(" Key Info: " + token.getKeyInfo()); diff --git a/base/java-tools/src/com/netscape/cmstools/tps/token/TokenModifyCLI.java b/base/java-tools/src/com/netscape/cmstools/tps/token/TokenModifyCLI.java index 1c5602caa..38e9fb00d 100644 --- a/base/java-tools/src/com/netscape/cmstools/tps/token/TokenModifyCLI.java +++ b/base/java-tools/src/com/netscape/cmstools/tps/token/TokenModifyCLI.java @@ -42,13 +42,28 @@ public class TokenModifyCLI extends CLI { } public void printHelp() { - formatter.printHelp(getFullName() + " <Token ID> --user <User ID> [OPTIONS...]", options); + formatter.printHelp(getFullName() + " <Token ID> [OPTIONS...]", options); } public void createOptions() { Option option = new Option(null, "user", true, "User ID"); option.setArgName("User ID"); - option.setRequired(true); + options.addOption(option); + + option = new Option(null, "type", true, "Type"); + option.setArgName("Type"); + options.addOption(option); + + option = new Option(null, "applet", true, "Applet ID"); + option.setArgName("Applet ID"); + options.addOption(option); + + option = new Option(null, "key-info", true, "Key info"); + option.setArgName("Key info"); + options.addOption(option); + + option = new Option(null, "policy", true, "Policy"); + option.setArgName("Policy"); options.addOption(option); } @@ -84,8 +99,12 @@ public class TokenModifyCLI extends CLI { TokenData tokenData = new TokenData(); tokenData.setID(tokenID); tokenData.setUserID(cmd.getOptionValue("user")); + tokenData.setType(cmd.getOptionValue("type")); + tokenData.setAppletID(cmd.getOptionValue("applet")); + tokenData.setKeyInfo(cmd.getOptionValue("key-info")); + tokenData.setPolicy(cmd.getOptionValue("policy")); - tokenData = tokenCLI.tokenClient.updateToken(tokenID, tokenData); + tokenData = tokenCLI.tokenClient.modifyToken(tokenID, tokenData); MainCLI.printMessage("Modified token \"" + tokenID + "\""); |