summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/tps
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2014-08-15 15:16:31 -0400
committerEndi S. Dewata <edewata@redhat.com>2014-08-15 19:17:47 -0400
commite749dad93d9d203a86ef7c2b35b106c2c3f68c21 (patch)
tree397fee6270aacf367e22cb91e87843296bc245ba /base/common/src/com/netscape/certsrv/tps
parent729c60539b43efa17cc54553b9589aece509cffa (diff)
downloadpki-e749dad93d9d203a86ef7c2b35b106c2c3f68c21.tar.gz
pki-e749dad93d9d203a86ef7c2b35b106c2c3f68c21.tar.xz
pki-e749dad93d9d203a86ef7c2b35b106c2c3f68c21.zip
Fixed missing TPS token attributes.
The missing token policy attribute has been added to token database. The REST services, CLI, and UI have been fixed accordingly. Other missing attributes in tokenRecord object class are unused. Ticket #1085
Diffstat (limited to 'base/common/src/com/netscape/certsrv/tps')
-rw-r--r--base/common/src/com/netscape/certsrv/tps/token/TokenData.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/tps/token/TokenData.java b/base/common/src/com/netscape/certsrv/tps/token/TokenData.java
index 27ee1fa20..235e86fea 100644
--- a/base/common/src/com/netscape/certsrv/tps/token/TokenData.java
+++ b/base/common/src/com/netscape/certsrv/tps/token/TokenData.java
@@ -57,6 +57,7 @@ public class TokenData {
TokenStatus status;
String appletID;
String keyInfo;
+ String policy;
Date createTimestamp;
Date modifyTimestamp;
@@ -125,6 +126,15 @@ public class TokenData {
this.keyInfo = keyInfo;
}
+ @XmlElement(name="Policy")
+ public String getPolicy() {
+ return policy;
+ }
+
+ public void setPolicy(String policy) {
+ this.policy = policy;
+ }
+
@XmlElement(name="CreateTimestamp")
public Date getCreateTimestamp() {
return createTimestamp;
@@ -162,6 +172,7 @@ public class TokenData {
result = prime * result + ((keyInfo == null) ? 0 : keyInfo.hashCode());
result = prime * result + ((link == null) ? 0 : link.hashCode());
result = prime * result + ((modifyTimestamp == null) ? 0 : modifyTimestamp.hashCode());
+ result = prime * result + ((policy == null) ? 0 : policy.hashCode());
result = prime * result + ((status == null) ? 0 : status.hashCode());
result = prime * result + ((tokenID == null) ? 0 : tokenID.hashCode());
result = prime * result + ((type == null) ? 0 : type.hashCode());
@@ -208,6 +219,11 @@ public class TokenData {
return false;
} else if (!modifyTimestamp.equals(other.modifyTimestamp))
return false;
+ if (policy == null) {
+ if (other.policy != null)
+ return false;
+ } else if (!policy.equals(other.policy))
+ return false;
if (status != other.status)
return false;
if (tokenID == null) {
@@ -256,6 +272,7 @@ public class TokenData {
before.setStatus(TokenStatus.ACTIVE);
before.setAppletID("APPLET1234");
before.setKeyInfo("key info");
+ before.setPolicy("FORCE_FORMAT=YES");
before.setCreateTimestamp(new Date());
before.setModifyTimestamp(new Date());