summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/cert/CertDataInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/common/src/com/netscape/certsrv/cert/CertDataInfo.java')
-rw-r--r--base/common/src/com/netscape/certsrv/cert/CertDataInfo.java138
1 files changed, 138 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/cert/CertDataInfo.java b/base/common/src/com/netscape/certsrv/cert/CertDataInfo.java
index 969e3e371..c4f157271 100644
--- a/base/common/src/com/netscape/certsrv/cert/CertDataInfo.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertDataInfo.java
@@ -22,6 +22,7 @@ package com.netscape.certsrv.cert;
import java.io.StringReader;
import java.io.StringWriter;
+import java.util.Date;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.Marshaller;
@@ -35,6 +36,7 @@ import org.jboss.resteasy.plugins.providers.atom.Link;
import com.netscape.certsrv.dbs.certdb.CertId;
import com.netscape.certsrv.dbs.certdb.CertIdAdapter;
+import com.netscape.certsrv.util.DateAdapter;
/**
* @author alee
@@ -60,6 +62,14 @@ public class CertDataInfo {
CertId id;
String subjectDN;
String status;
+ String type;
+ Integer version;
+ String keyAlgorithmOID;
+ Integer keyLength;
+ Date notValidBefore;
+ Date notValidAfter;
+ Date issuedOn;
+ String issuedBy;
Link link;
@@ -91,6 +101,80 @@ public class CertDataInfo {
this.status = status;
}
+ @XmlElement(name="Type")
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ @XmlElement(name="Version")
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+
+ @XmlElement(name="KeyAlgorithmOID")
+ public String getKeyAlgorithmOID() {
+ return keyAlgorithmOID;
+ }
+
+ public void setKeyAlgorithmOID(String keyAlgorithmOID) {
+ this.keyAlgorithmOID = keyAlgorithmOID;
+ }
+
+ public Integer getKeyLength() {
+ return keyLength;
+ }
+
+ public void setKeyLength(Integer keyLength) {
+ this.keyLength = keyLength;
+ }
+
+ @XmlElement(name="NotValidBefore")
+ @XmlJavaTypeAdapter(DateAdapter.class)
+ public Date getNotValidBefore() {
+ return notValidBefore;
+ }
+
+ public void setNotValidBefore(Date notValidBefore) {
+ this.notValidBefore = notValidBefore;
+ }
+
+ @XmlElement(name="NotValidAfter")
+ @XmlJavaTypeAdapter(DateAdapter.class)
+ public Date getNotValidAfter() {
+ return notValidAfter;
+ }
+
+ public void setNotValidAfter(Date notValidAfter) {
+ this.notValidAfter = notValidAfter;
+ }
+
+ @XmlElement(name="IssuedOn")
+ @XmlJavaTypeAdapter(DateAdapter.class)
+ public Date getIssuedOn() {
+ return issuedOn;
+ }
+
+ public void setIssuedOn(Date issuedOn) {
+ this.issuedOn = issuedOn;
+ }
+
+ @XmlElement(name="IssuedBy")
+ public String getIssuedBy() {
+ return issuedBy;
+ }
+
+ public void setIssuedBy(String issuedBy) {
+ this.issuedBy = issuedBy;
+ }
+
@XmlElement(name="Link")
public Link getLink() {
return link;
@@ -105,8 +189,17 @@ public class CertDataInfo {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((issuedBy == null) ? 0 : issuedBy.hashCode());
+ result = prime * result + ((issuedOn == null) ? 0 : issuedOn.hashCode());
+ result = prime * result + ((keyAlgorithmOID == null) ? 0 : keyAlgorithmOID.hashCode());
+ result = prime * result + ((keyLength == null) ? 0 : keyLength.hashCode());
+ result = prime * result + ((link == null) ? 0 : link.hashCode());
+ result = prime * result + ((notValidAfter == null) ? 0 : notValidAfter.hashCode());
+ result = prime * result + ((notValidBefore == null) ? 0 : notValidBefore.hashCode());
result = prime * result + ((status == null) ? 0 : status.hashCode());
result = prime * result + ((subjectDN == null) ? 0 : subjectDN.hashCode());
+ result = prime * result + ((type == null) ? 0 : type.hashCode());
+ result = prime * result + ((version == null) ? 0 : version.hashCode());
return result;
}
@@ -124,6 +217,41 @@ public class CertDataInfo {
return false;
} else if (!id.equals(other.id))
return false;
+ if (issuedBy == null) {
+ if (other.issuedBy != null)
+ return false;
+ } else if (!issuedBy.equals(other.issuedBy))
+ return false;
+ if (issuedOn == null) {
+ if (other.issuedOn != null)
+ return false;
+ } else if (!issuedOn.equals(other.issuedOn))
+ return false;
+ if (keyAlgorithmOID == null) {
+ if (other.keyAlgorithmOID != null)
+ return false;
+ } else if (!keyAlgorithmOID.equals(other.keyAlgorithmOID))
+ return false;
+ if (keyLength == null) {
+ if (other.keyLength != null)
+ return false;
+ } else if (!keyLength.equals(other.keyLength))
+ return false;
+ if (link == null) {
+ if (other.link != null)
+ return false;
+ } else if (!link.equals(other.link))
+ return false;
+ if (notValidAfter == null) {
+ if (other.notValidAfter != null)
+ return false;
+ } else if (!notValidAfter.equals(other.notValidAfter))
+ return false;
+ if (notValidBefore == null) {
+ if (other.notValidBefore != null)
+ return false;
+ } else if (!notValidBefore.equals(other.notValidBefore))
+ return false;
if (status == null) {
if (other.status != null)
return false;
@@ -134,6 +262,16 @@ public class CertDataInfo {
return false;
} else if (!subjectDN.equals(other.subjectDN))
return false;
+ if (type == null) {
+ if (other.type != null)
+ return false;
+ } else if (!type.equals(other.type))
+ return false;
+ if (version == null) {
+ if (other.version != null)
+ return false;
+ } else if (!version.equals(other.version))
+ return false;
return true;
}