summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/cert
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2014-11-21 16:16:33 -0500
committerEndi S. Dewata <edewata@redhat.com>2014-11-25 10:04:27 -0500
commit93a8a1f66b401d6a8f46a14d1143feb1ade21de9 (patch)
tree45991949f3ead0b2662c7ee0200aca87e8ab83a9 /base/common/src/com/netscape/certsrv/cert
parent7260d6c1568d77bb2ab3de9264006b411b505cc6 (diff)
downloadpki-93a8a1f66b401d6a8f46a14d1143feb1ade21de9.tar.gz
pki-93a8a1f66b401d6a8f46a14d1143feb1ade21de9.tar.xz
pki-93a8a1f66b401d6a8f46a14d1143feb1ade21de9.zip
Removed profile input/output IDs from CLI output.
The current profile inputs/outputs do not have meaningful IDs (e.g. i1, i2, o1) and are not used by the client so they should not be displayed in the CLI output. In the future the IDs should be renamed into something meaningful (e.g. keygen, sn, cert) and the inputs/outputs should be retrieved by ID. New methods have been added to retrieve by ID. https://fedorahosted.org/pki/ticket/1147
Diffstat (limited to 'base/common/src/com/netscape/certsrv/cert')
-rw-r--r--base/common/src/com/netscape/certsrv/cert/CertEnrollmentRequest.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/cert/CertEnrollmentRequest.java b/base/common/src/com/netscape/certsrv/cert/CertEnrollmentRequest.java
index 732efae0a..72aad330f 100644
--- a/base/common/src/com/netscape/certsrv/cert/CertEnrollmentRequest.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertEnrollmentRequest.java
@@ -144,7 +144,12 @@ public class CertEnrollmentRequest {
return newInput;
}
+ // TODO: deprecate this method in 10.3
public ProfileInput getInput(String name) {
+ return getInputByName(name);
+ }
+
+ public ProfileInput getInputByName(String name) {
for (ProfileInput input : inputs) {
if (input.getName().equals(name))
return input;
@@ -152,6 +157,14 @@ public class CertEnrollmentRequest {
return null;
}
+ public ProfileInput getInputByID(String id) {
+ for (ProfileInput input : inputs) {
+ if (input.getId().equals(id))
+ return input;
+ }
+ return null;
+ }
+
public void addOutput(ProfileOutput output) {
ProfileOutput curOutput = getOutput(output.getName());
if (curOutput != null) {
@@ -167,7 +180,12 @@ public class CertEnrollmentRequest {
}
}
+ // TODO: deprecate this method in 10.3
public ProfileOutput getOutput(String name) {
+ return getOutputByName(name);
+ }
+
+ public ProfileOutput getOutputByName(String name) {
for (ProfileOutput output : outputs) {
if (output.getName().equals(name))
return output;
@@ -175,6 +193,14 @@ public class CertEnrollmentRequest {
return null;
}
+ public ProfileOutput getOutputByID(String id) {
+ for (ProfileOutput output : outputs) {
+ if (output.getId().equals(id))
+ return output;
+ }
+ return null;
+ }
+
public HashMap<String, String> toParams() {
HashMap<String, String> ret = new HashMap<String, String>();
ret.put("isRenewal", Boolean.valueOf(renewal).toString());