Class 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 Detail

      • logger

        public static org.slf4j.Logger logger
      • mNames

        protected static java.util.Vector<java.lang.String> mNames
    • 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 EBaseException
        Sets attribute to this record.
        Specified by:
        set in interface IAttrSet
        Parameters:
        name - the name of the attribute
        obj - the attribute object.
        Throws:
        EBaseException - on attribute handling errors.
      • get

        public java.lang.Object get​(java.lang.String name)
                             throws EBaseException
        Retrieves attributes from this record.
        Specified by:
        get in interface IAttrSet
        Parameters:
        name - the name of the attribute to return.
        Throws:
        EBaseException - on attribute handling errors.
      • delete

        public void delete​(java.lang.String name)
                    throws EBaseException
        Deletes attribute from this record.
        Specified by:
        delete in interface IAttrSet
        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: IAttrSet
        Returns an enumeration of the names of the attributes existing within this AttrSet.
        Specified by:
        getElements in interface IAttrSet
        Returns:
        an enumeration of the attribute names.
      • getSerializableAttrNames

        public java.util.Enumeration<java.lang.String> getSerializableAttrNames()
        Description copied from interface: IDBObj
        Returns 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:
        getSerializableAttrNames in interface IDBObj
        Returns:
        a list of serializable attribute names
      • getCertificate

        public org.mozilla.jss.netscape.security.x509.X509CertImpl getCertificate()
        Retrieves X509 certificate.
        Specified by:
        getCertificate in interface ICertRecord
        Returns:
        certificate
      • getStatus

        public java.lang.String getStatus()
        Retrieves certificate status.
        Specified by:
        getStatus in interface ICertRecord
        Returns:
        certificate status
      • getAutoRenew

        public java.lang.String getAutoRenew()
        Retrieves the auto renew mode.
      • 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:
        getSerialNumber in interface ICertRecord
        Returns:
        certificate serial number
      • getIssuedBy

        public java.lang.String getIssuedBy()
        Retrieves the person who issues this certificate.
        Specified by:
        getIssuedBy in interface ICertRecord
        Returns:
        name of which user issued this certificate
      • getRevokedBy

        public java.lang.String getRevokedBy()
        Retrieves the person who revokes this certificate.
        Specified by:
        getRevokedBy in interface ICertRecord
        Returns:
        name of who revoked this certificate
      • getRevokedOn

        public java.util.Date getRevokedOn()
        Retrieves the date which this record is revoked.
        Specified by:
        getRevokedOn in interface ICertRecord
        Returns:
        date when this certificate was revoked
      • getCertificateSerialNumber

        public java.math.BigInteger getCertificateSerialNumber()
        Retrieves certificate serial number.
        Specified by:
        getCertificateSerialNumber in interface ICertRecord
        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 EDBException
        Return revocation date.
        Throws:
        EDBException
      • getCreateTime

        public java.util.Date getCreateTime()
        Description copied from interface: ICertRecord
        Retrieves time of creation of this certificate record.
        Specified by:
        getCreateTime in interface ICertRecord
        Returns:
        time of creation of this certificate record
      • getModifyTime

        public java.util.Date getModifyTime()
        Description copied from interface: ICertRecord
        Retrieves time of modification of this certificate record.
        Specified by:
        getModifyTime in interface ICertRecord
        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.X509ExtensionException
        Description copied from interface: ICertRecord
        returns the revocation reason
        Specified by:
        getRevReason in interface ICertRecord
        Throws:
        EBaseException
        org.mozilla.jss.netscape.security.x509.X509ExtensionException
      • isCertOnHold

        public boolean isCertOnHold()
        Description copied from interface: ICertRecord
        is this cert on hold?
        Specified by:
        isCertOnHold in interface ICertRecord
      • toString

        public java.lang.String toString()
        String representation
        Overrides:
        toString in class java.lang.Object