Package de.xima.fc.certificate.mgmt.cert
Class CertificateInfoDTO
- java.lang.Object
-
- de.xima.fc.certificate.mgmt.cert.CertificateInfoDTO
-
- All Implemented Interfaces:
IKeystoreEntryInfoDTO,Serializable
public class CertificateInfoDTO extends Object implements IKeystoreEntryInfoDTO
A DTO that contains information about a certificate.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CertificateInfoDTO(Long id, int lockingVersion, de.xima.cmn.time.DateTimeRange validity, X501DistinguishedName issuer, X501DistinguishedName subject, String serialNumber, ECertificateType certificateType, ECertificateSource certificateSource, String keyAlgorithm, int keySize, Set<CertificateUsageDTO> usages, boolean hasPrivateKey, boolean hasCsr, boolean renewed, Instant lastCsrExport, Instant lastCaResponseImport, Instant createdAt, Instant updatedAt, KeyStoreScope keyStoreScope)Creates a newCertificateInfoDTOinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)ECertificateSourcegetCertificateSource()The source of the certificate, which indicates how the certificate was created or obtained.ECertificateTypegetCertificateType()The type of the certificate.InstantgetCreatedAt()The creation instant.LonggetId()The (database) id of the certificate.X501DistinguishedNamegetIssuer()The issuer of the certificate in the form of a distinguished name (e.g.StringgetKeyAlgorithm()The key algorithm of the certificate.intgetKeySize()The key size of the certificate.KeyStoreScopegetKeyStoreScope()The scope of the keystore the certificate is contained in.InstantgetLastCaResponseImport()The instant of the last import of a CA (Certificate Authority) response to a CSR.InstantgetLastCsrExport()The instant of the last export of the CSR (Certificate Signing Request).intgetLockingVersion()The (database) locking version of the corresponding entity.StringgetSerialNumber()The serial number of the certificate.X501DistinguishedNamegetSubject()The subject of the certificate in the form of a distinguished name (e.g.EKeyStoreEntryTypegetType()The type of the keystore entry.InstantgetUpdatedAt()The last modification instant.Set<CertificateUsageDTO>getUsages()The usages of the certificate.de.xima.cmn.time.DateTimeRangegetValidity()The date time range of the certificate's validity.inthashCode()booleanisAutoRenew()Whether the certificate should be automatically renewed or not.booleanisHasCsr()Whether the certificate has a CSR (Certificate Signing Request) in the database or not.booleanisHasPrivateKey()Whether the certificate has a private key in the database or not.booleanisRenewed()Whether the certificate has been renewed or not.booleanisValid(Instant timestamp)Whether the certificate is valid for the given timestamp.voidsetAutoRenew(boolean autoRenew)Whether the certificate should be automatically renewed or not.StringtoString()
-
-
-
Constructor Detail
-
CertificateInfoDTO
public CertificateInfoDTO(Long id, int lockingVersion, de.xima.cmn.time.DateTimeRange validity, X501DistinguishedName issuer, X501DistinguishedName subject, String serialNumber, ECertificateType certificateType, ECertificateSource certificateSource, String keyAlgorithm, int keySize, Set<CertificateUsageDTO> usages, boolean hasPrivateKey, boolean hasCsr, boolean renewed, Instant lastCsrExport, Instant lastCaResponseImport, Instant createdAt, Instant updatedAt, KeyStoreScope keyStoreScope)
Creates a newCertificateInfoDTOinstance.- Parameters:
id- The (database) id of the certificate.lockingVersion- The (database) locking version of the corresponding entity.validity- The date time range of the certificate's validity.issuer- The issuer of the certificate in the form of a distinguished name (e.g. "CN=CA, OU=IT, O=XIMA").subject- The subject of the certificate in the form of a distinguished name (e.g. "CN=John Doe, OU=IT, O=XIMA").serialNumber- The serial number of the certificate.certificateType- The type of the certificate.certificateSource- The source of the certificate, which indicates how the certificate was created or obtained.keyAlgorithm- The key algorithm of the certificate.keySize- The key size of the certificate.usages- The usages of the certificate.hasPrivateKey- Whether the certificate has a private key in the database or not.hasCsr- Whether the certificate has a CSR (Certificate Signing Request) in the database or not.renewed- Whether the certificate has been renewed or not.lastCsrExport- The instant of the last export of the CSR (Certificate Signing Request).lastCaResponseImport- The instant of the last import of a CA (Certificate Authority) response to a CSR.createdAt- The creation instant.updatedAt- The last modification instant.keyStoreScope- The scope of the keystore the certificate is contained in.
-
-
Method Detail
-
isValid
public boolean isValid(Instant timestamp)
Whether the certificate is valid for the given timestamp.- Parameters:
timestamp- The timestamp to check.- Returns:
- true if the certificate is valid for the given timestamp, false otherwise.
-
getId
public Long getId()
The (database) id of the certificate.
-
getLockingVersion
public int getLockingVersion()
The (database) locking version of the corresponding entity.
-
getValidity
public de.xima.cmn.time.DateTimeRange getValidity()
The date time range of the certificate's validity.
-
getIssuer
public X501DistinguishedName getIssuer()
The issuer of the certificate in the form of a distinguished name (e.g. "CN=CA, OU=IT, O=XIMA").
-
getSubject
public X501DistinguishedName getSubject()
The subject of the certificate in the form of a distinguished name (e.g. "CN=John Doe, OU=IT, O=XIMA").
-
getSerialNumber
public String getSerialNumber()
The serial number of the certificate.
-
getCertificateType
public ECertificateType getCertificateType()
The type of the certificate.
-
getCertificateSource
public ECertificateSource getCertificateSource()
The source of the certificate, which indicates how the certificate was created or obtained.
-
getKeyAlgorithm
public String getKeyAlgorithm()
The key algorithm of the certificate.
-
getKeySize
public int getKeySize()
The key size of the certificate.
-
getUsages
public Set<CertificateUsageDTO> getUsages()
The usages of the certificate.
-
isHasPrivateKey
public boolean isHasPrivateKey()
Whether the certificate has a private key in the database or not.
-
isHasCsr
public boolean isHasCsr()
Whether the certificate has a CSR (Certificate Signing Request) in the database or not.
-
isRenewed
public boolean isRenewed()
Whether the certificate has been renewed or not.
-
getLastCsrExport
public Instant getLastCsrExport()
The instant of the last export of the CSR (Certificate Signing Request).
-
getLastCaResponseImport
public Instant getLastCaResponseImport()
The instant of the last import of a CA (Certificate Authority) response to a CSR.
-
getCreatedAt
public Instant getCreatedAt()
The creation instant.
-
getUpdatedAt
public Instant getUpdatedAt()
The last modification instant.
-
getKeyStoreScope
public KeyStoreScope getKeyStoreScope()
The scope of the keystore the certificate is contained in.
-
getType
public EKeyStoreEntryType getType()
The type of the keystore entry. AlwaysEKeyStoreEntryType.CERTIFICATEfor certificates.- Specified by:
getTypein interfaceIKeystoreEntryInfoDTO
-
isAutoRenew
public boolean isAutoRenew()
Whether the certificate should be automatically renewed or not.
-
setAutoRenew
public void setAutoRenew(boolean autoRenew)
Whether the certificate should be automatically renewed or not.
-
canEqual
protected boolean canEqual(Object other)
-
-