Package com.netscape.cmscore.dbs
Class CertRecord
- java.lang.Object
-
- com.netscape.cmscore.dbs.CertRecord
-
- All Implemented Interfaces:
IAttrSet,ICertRecord,IDBObj,java.io.Serializable
public class CertRecord extends java.lang.Object implements IDBObj, ICertRecord
A class represents a serializable certificate record.- Version:
- $Revision$, $Date$
- Author:
- thomask
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static org.slf4j.Loggerloggerprotected static java.util.Vector<java.lang.String>mNames-
Fields inherited from interface com.netscape.certsrv.dbs.certdb.ICertRecord
ATTR_AUTO_RENEW, ATTR_CERT_STATUS, ATTR_CREATE_TIME, ATTR_ID, ATTR_ISSUED_BY, ATTR_META_INFO, ATTR_MODIFY_TIME, ATTR_REVO_INFO, ATTR_REVOKED_BY, ATTR_REVOKED_ON, ATTR_X509CERT, ATTR_X509CERT_ALGORITHM, ATTR_X509CERT_DURATION, ATTR_X509CERT_EXTENSION, ATTR_X509CERT_ISSUER, ATTR_X509CERT_NOT_AFTER, ATTR_X509CERT_NOT_BEFORE, ATTR_X509CERT_PUBLIC_KEY_DATA, ATTR_X509CERT_SERIAL_NUMBER, ATTR_X509CERT_SIGNING_ALGORITHM, ATTR_X509CERT_SUBJECT, ATTR_X509CERT_VERSION, AUTO_RENEWAL_DISABLED, AUTO_RENEWAL_DONE, AUTO_RENEWAL_ENABLED, AUTO_RENEWAL_NOTIFIED, META_CERT_TYPE, META_CHALLENGE_PHRASE, META_CRMF_REQID, META_LDAPPUBLISH, META_OLD_CERT, META_PROFILE_ID, META_RENEWED_CERT, META_REQUEST_ID, META_REV_SHRTOK, STATUS_EXPIRED, STATUS_INVALID, STATUS_REVOKED, STATUS_REVOKED_EXPIRED, STATUS_VALID, X509CERT_ALGORITHM, X509CERT_DURATION, X509CERT_EXTENSION, X509CERT_ISSUER, X509CERT_NOT_AFTER, X509CERT_NOT_BEFORE, X509CERT_PUBLIC_KEY_DATA, X509CERT_SERIAL_NUMBER, X509CERT_SIGNING_ALGORITHM, X509CERT_SUBJECT, X509CERT_VERSION
-
-
Constructor Summary
Constructors Constructor Description CertRecord()Constructs empty certificate record.CertRecord(java.math.BigInteger id, java.security.cert.Certificate cert, MetaInfo meta)Constructs certiificate record with certificate and meta info.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(java.lang.String name)Deletes attribute from this record.java.lang.Objectget(java.lang.String name)Retrieves attributes from this record.java.lang.StringgetAutoRenew()Retrieves the auto renew mode.org.mozilla.jss.netscape.security.x509.X509CertImplgetCertificate()Retrieves X509 certificate.java.math.BigIntegergetCertificateSerialNumber()Retrieves certificate serial number.java.util.DategetCreateTime()Retrieves time of creation of this certificate record.java.util.Enumeration<java.lang.String>getElements()Returns an enumeration of the names of the attributes existing within this AttrSet.java.lang.StringgetIssuedBy()Retrieves the person who issues this certificate.MetaInfogetMetaInfo()Retrieves meta information.java.util.DategetModifyTime()Retrieves time of modification of this certificate record.java.util.DategetNotAfter()Retrieves not after.java.util.DategetNotBefore()java.util.DategetRevocationDate()Return revocation date.IRevocationInfogetRevocationInfo()Retrieves revocation information.java.lang.StringgetRevokedBy()Retrieves the person who revokes this certificate.java.util.DategetRevokedOn()Retrieves the date which this record is revoked.org.mozilla.jss.netscape.security.x509.RevocationReasongetRevReason()returns the revocation reasonjava.util.Enumeration<java.lang.String>getSerializableAttrNames()Returns a list of serializable attribute names.java.math.BigIntegergetSerialNumber()Retrieves serial number of this record.java.lang.StringgetStatus()Retrieves certificate status.booleanisCertOnHold()is this cert on hold?voidset(java.lang.String name, java.lang.Object obj)Sets attribute to this record.java.lang.StringtoString()String representation
-
-
-
Constructor Detail
-
CertRecord
public CertRecord()
Constructs empty certificate record.
-
CertRecord
public CertRecord(java.math.BigInteger id, java.security.cert.Certificate cert, MetaInfo meta)Constructs certiificate record with certificate and meta info.
-
-
Method Detail
-
set
public void set(java.lang.String name, java.lang.Object obj) throws EBaseExceptionSets attribute to this record.- Specified by:
setin interfaceIAttrSet- Parameters:
name- the name of the attributeobj- the attribute object.- Throws:
EBaseException- on attribute handling errors.
-
get
public java.lang.Object get(java.lang.String name) throws EBaseExceptionRetrieves attributes from this record.- Specified by:
getin interfaceIAttrSet- Parameters:
name- the name of the attribute to return.- Throws:
EBaseException- on attribute handling errors.
-
delete
public void delete(java.lang.String name) throws EBaseExceptionDeletes attribute from this record.- Specified by:
deletein interfaceIAttrSet- Parameters:
name- the name of the attribute to delete.- Throws:
EBaseException- on attribute handling errors.
-
getElements
public java.util.Enumeration<java.lang.String> getElements()
Description copied from interface:IAttrSetReturns an enumeration of the names of the attributes existing within this AttrSet.- Specified by:
getElementsin interfaceIAttrSet- Returns:
- an enumeration of the attribute names.
-
getSerializableAttrNames
public java.util.Enumeration<java.lang.String> getSerializableAttrNames()
Description copied from interface:IDBObjReturns a list of serializable attribute names. This method should return the attribute name even if there is no attribute value for the attribute.- Specified by:
getSerializableAttrNamesin interfaceIDBObj- Returns:
- a list of serializable attribute names
-
getCertificate
public org.mozilla.jss.netscape.security.x509.X509CertImpl getCertificate()
Retrieves X509 certificate.- Specified by:
getCertificatein interfaceICertRecord- Returns:
- certificate
-
getMetaInfo
public MetaInfo getMetaInfo()
Retrieves meta information.- Specified by:
getMetaInfoin interfaceICertRecord- Returns:
- meta info
-
getStatus
public java.lang.String getStatus()
Retrieves certificate status.- Specified by:
getStatusin interfaceICertRecord- Returns:
- certificate status
-
getAutoRenew
public java.lang.String getAutoRenew()
Retrieves the auto renew mode.
-
getRevocationInfo
public IRevocationInfo getRevocationInfo()
Retrieves revocation information.- Specified by:
getRevocationInfoin interfaceICertRecord- Returns:
- revocation info
-
getSerialNumber
public java.math.BigInteger getSerialNumber()
Retrieves serial number of this record. Usually, it is the same of the serial number of the associated certificate.- Specified by:
getSerialNumberin interfaceICertRecord- Returns:
- certificate serial number
-
getIssuedBy
public java.lang.String getIssuedBy()
Retrieves the person who issues this certificate.- Specified by:
getIssuedByin interfaceICertRecord- Returns:
- name of which user issued this certificate
-
getRevokedBy
public java.lang.String getRevokedBy()
Retrieves the person who revokes this certificate.- Specified by:
getRevokedByin interfaceICertRecord- Returns:
- name of who revoked this certificate
-
getRevokedOn
public java.util.Date getRevokedOn()
Retrieves the date which this record is revoked.- Specified by:
getRevokedOnin interfaceICertRecord- Returns:
- date when this certificate was revoked
-
getCertificateSerialNumber
public java.math.BigInteger getCertificateSerialNumber()
Retrieves certificate serial number.- Specified by:
getCertificateSerialNumberin interfaceICertRecord- Returns:
- certificate serial number
-
getNotAfter
public java.util.Date getNotAfter()
Retrieves not after.
-
getNotBefore
public java.util.Date getNotBefore()
-
getRevocationDate
public java.util.Date getRevocationDate() throws EDBExceptionReturn revocation date.- Throws:
EDBException
-
getCreateTime
public java.util.Date getCreateTime()
Description copied from interface:ICertRecordRetrieves time of creation of this certificate record.- Specified by:
getCreateTimein interfaceICertRecord- Returns:
- time of creation of this certificate record
-
getModifyTime
public java.util.Date getModifyTime()
Description copied from interface:ICertRecordRetrieves time of modification of this certificate record.- Specified by:
getModifyTimein interfaceICertRecord- Returns:
- time of modification of this certificate record
-
getRevReason
public org.mozilla.jss.netscape.security.x509.RevocationReason getRevReason() throws EBaseException, org.mozilla.jss.netscape.security.x509.X509ExtensionExceptionDescription copied from interface:ICertRecordreturns the revocation reason- Specified by:
getRevReasonin interfaceICertRecord- Throws:
EBaseExceptionorg.mozilla.jss.netscape.security.x509.X509ExtensionException
-
isCertOnHold
public boolean isCertOnHold()
Description copied from interface:ICertRecordis this cert on hold?- Specified by:
isCertOnHoldin interfaceICertRecord
-
toString
public java.lang.String toString()
String representation- Overrides:
toStringin classjava.lang.Object
-
-