summaryrefslogtreecommitdiffstats
path: root/base/server/cmscore/src/com/netscape/cmscore/dbs/KeyRecord.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2016-04-16 11:21:17 -0400
committerAde Lee <alee@redhat.com>2016-04-20 17:29:33 -0400
commitbb6fd9e1a73e2ee224fc9332681fb59113f94d8f (patch)
treecdd9ca88457417365b8a70062fba5edf1a10a492 /base/server/cmscore/src/com/netscape/cmscore/dbs/KeyRecord.java
parent4fddcd370e6f3d47f252eec8077cbca379d4e281 (diff)
downloadpki-bb6fd9e1a73e2ee224fc9332681fb59113f94d8f.tar.gz
pki-bb6fd9e1a73e2ee224fc9332681fb59113f94d8f.tar.xz
pki-bb6fd9e1a73e2ee224fc9332681fb59113f94d8f.zip
Add realm to the key record
Part of Trac Ticket# 2041
Diffstat (limited to 'base/server/cmscore/src/com/netscape/cmscore/dbs/KeyRecord.java')
-rw-r--r--base/server/cmscore/src/com/netscape/cmscore/dbs/KeyRecord.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/base/server/cmscore/src/com/netscape/cmscore/dbs/KeyRecord.java b/base/server/cmscore/src/com/netscape/cmscore/dbs/KeyRecord.java
index 7ae546184..fbf2ee227 100644
--- a/base/server/cmscore/src/com/netscape/cmscore/dbs/KeyRecord.java
+++ b/base/server/cmscore/src/com/netscape/cmscore/dbs/KeyRecord.java
@@ -40,9 +40,6 @@ import com.netscape.certsrv.dbs.keydb.KeyState;
*/
public class KeyRecord implements IDBObj, IKeyRecord {
- /**
- *
- */
private static final long serialVersionUID = -3765000841161998984L;
private BigInteger mSerialNo = null;
private KeyState mState = null;
@@ -59,6 +56,7 @@ public class KeyRecord implements IDBObj, IKeyRecord {
private String mClientId = null;
private String mStatus = null;
private String mDataType = null;
+ private String mRealm = null;
protected static Vector<String> mNames = new Vector<String>();
@@ -78,6 +76,7 @@ public class KeyRecord implements IDBObj, IKeyRecord {
mNames.addElement(ATTR_CLIENT_ID);
mNames.addElement(ATTR_STATUS);
mNames.addElement(ATTR_DATA_TYPE);
+ mNames.addElement(ATTR_REALM);
}
/**
@@ -141,6 +140,8 @@ public class KeyRecord implements IDBObj, IKeyRecord {
mDataType = (String) object;
} else if (name.equalsIgnoreCase(ATTR_STATUS)) {
mStatus = (String) object;
+ } else if (name.equalsIgnoreCase(ATTR_REALM)) {
+ mRealm = (String) object;
} else {
throw new EBaseException(com.netscape.certsrv.apps.CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", name));
}
@@ -181,6 +182,8 @@ public class KeyRecord implements IDBObj, IKeyRecord {
return mDataType;
} else if (name.equalsIgnoreCase(ATTR_STATUS)) {
return mStatus;
+ } else if (name.equalsIgnoreCase(ATTR_REALM)) {
+ return mRealm;
} else {
throw new EBaseException(com.netscape.certsrv.apps.CMS.getUserMessage("CMS_BASE_INVALID_ATTRIBUTE", name));
}
@@ -339,7 +342,7 @@ public class KeyRecord implements IDBObj, IKeyRecord {
}
/**
- * Sets the dateso of revocation.
+ * Sets the date of revocation.
* <P>
*/
public void setDateOfRevocation(Date dates[]) throws EBaseException {
@@ -389,4 +392,9 @@ public class KeyRecord implements IDBObj, IKeyRecord {
public String getDataType() throws EBaseException {
return mDataType;
}
+
+ @Override
+ public String getRealm() throws EBaseException {
+ return mRealm;
+ }
}