Class CertificateViewModel
java.lang.Object
de.xima.fc.certificate.gui.internal.administration.CertificateViewModel
- All Implemented Interfaces:
IKeystoreEntryViewModel, Serializable
Locale specific view model for certificates.
- Since:
- 8.5.0
- Author:
- XIMA Media GmbH
- See Also:
-
Field Summary
Fields inherited from interface IKeystoreEntryViewModel
UPDATE_OFFSET_IN_MINUTES -
Constructor Summary
ConstructorsConstructorDescriptionCertificateViewModel(int originalDtoHashCode, CertificateInfoDTO certificateInfoDto, Long id, de.xima.cmn.time.DateTimeRange validity, Instant createdAt, Instant updatedAt, X501DistinguishedName issuer, X501DistinguishedName subject, String serialNumber, String keyAlgorithm, Integer keySize, boolean hasCsr, Instant lastCsrExport, Instant lastCaResponseImport, List<KeystoreEntryUsageViewModel> usages, boolean hasPrivateKey, KeystoreViewModel keystore, List<KeyStoreEntryIssueDetailModel> issues, List<EKeystoreEntryTrait> traits, EViewStatus status, List<EViewKeystoreEntryUsageType> usageTypes, boolean canBeRenewedAutomatically) Creates a newCertificateViewModelinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe underlying certificate info DTO.The date when the certificate was created.getId()The (database) id of the certificate.The issuer of the certificate in the form of a distinguished name (e.g.Returns the display name of the issuer of the certificate.The issues with the certificate.The key algorithm of the certificate.The key size of the certificate.The keystore that contains the certificate.The instant when the last CA (Certificate Authority) response was imported for this certificate.The instant when the CSR (Certificate Signing Request) was last exported.intThe original hash code of the certificate view model.The serial number of the certificate.getStateDescription(Locale locale) Returns the description of the state of the certificate.The status of the certificate, whether there are warnings or errors.The subject of the certificate in the form of a distinguished name (e.g.Returns the display name of the subject of the certificate.Traits to filter key store entries by in the administration view.getType()Gets the type of the keystore entry.getTypeDisplayName(Locale locale) Returns the localized display name of the type of the keystore entry.The date when the certificate was last updated.A list of the usages of the certificate sorted by their localized display name.The intended usages of the certificate.de.xima.cmn.time.DateTimeRangeThe date time range of the certificate's validity.inthashCode()booleanReturns whether the certificate is set to auto-renew or not.booleanWhether the certificate can be renewed automatically or not.booleanReturns whether this keystore entry is deletable or not.booleanReturns whether this keystore entry is downloadable or not.booleanbooleanisHasCsr()Whether the certificate has a CSR (Certificate Signing Request) or not.booleanWhether the certificate has a private key in the database or not.voidsetAutoRenew(boolean autoRenew) Sets whether the certificate is set to auto-renew or not.toString()Methods inherited from interface IKeystoreEntryViewModel
getCreatedAtLocalDate, getCreatedAtLocalDateTime, getUpdatedAtLocalDate, getUpdatedAtLocalDateTime, getValidFrom, getValidFromLocalDate, getValidFromLocalDateTime, getValidUntil, getValidUntilLocalDate, getValidUntilLocalDateTime, hasIssue, isNew, isRecentlyUpdated
-
Constructor Details
-
CertificateViewModel
public CertificateViewModel(int originalDtoHashCode, CertificateInfoDTO certificateInfoDto, Long id, de.xima.cmn.time.DateTimeRange validity, Instant createdAt, Instant updatedAt, X501DistinguishedName issuer, X501DistinguishedName subject, String serialNumber, String keyAlgorithm, Integer keySize, boolean hasCsr, Instant lastCsrExport, Instant lastCaResponseImport, List<KeystoreEntryUsageViewModel> usages, boolean hasPrivateKey, KeystoreViewModel keystore, List<KeyStoreEntryIssueDetailModel> issues, List<EKeystoreEntryTrait> traits, EViewStatus status, List<EViewKeystoreEntryUsageType> usageTypes, boolean canBeRenewedAutomatically) Creates a newCertificateViewModelinstance.- Parameters:
originalDtoHashCode- The original hash code of the certificate view model. This is used to detect changes in the view model.certificateInfoDto- The underlying certificate info DTO.id- The (database) id of the certificate.validity- The date time range of the certificate's validity.createdAt- The date when the certificate was created.updatedAt- The date when the certificate was last updated.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.keyAlgorithm- The key algorithm of the certificate.keySize- The key size of the certificate.hasCsr- Whether the certificate has a CSR (Certificate Signing Request) or not. This is only applicable for certificates that are created by formcycle and signed by the formcycle CA.lastCsrExport- The instant when the CSR (Certificate Signing Request) was last exported. If this isnull, the CSR has never been exported and therefore no CSR process has been initiated for this certificate.lastCaResponseImport- The instant when the last CA (Certificate Authority) response was imported for this certificate. If this isnull, no CA response has been imported yet. If this isnullandlastCsrExportis notnull, it indicates that the CSR was exported, therefore a CSR process has been initiated, but no CA response has been received yet.usages- A list of the usages of the certificate sorted by their localized display name.hasPrivateKey- Whether the certificate has a private key in the database or not.keystore- The keystore that contains the certificate.issues- The issues with the certificate.traits- Traits to filter key store entries by in the administration view.status- The status of the certificate, whether there are warnings or errors.usageTypes- The intended usages of the certificate.canBeRenewedAutomatically- Whether the certificate can be renewed automatically or not.
-
-
Method Details
-
getIssuerDisplayName
Returns the display name of the issuer of the certificate.- Specified by:
getIssuerDisplayNamein interfaceIKeystoreEntryViewModel- Returns:
- The display name of the issuer of the certificate.
-
getLastCaResponseImportLocalDate
-
getLastCaResponseImportLocalDateTime
-
getLastCsrExportLocalDate
-
getLastCsrExportLocalDateTime
-
isAutoRenew
public boolean isAutoRenew()Returns whether the certificate is set to auto-renew or not.- Returns:
trueif the certificate is set to auto-renew,falseotherwise.
-
setAutoRenew
public void setAutoRenew(boolean autoRenew) Sets whether the certificate is set to auto-renew or not.- Parameters:
autoRenew-trueto set the certificate to auto-renew,falseotherwise.
-
getStateDescription
Returns the description of the state of the certificate.- Specified by:
getStateDescriptionin interfaceIKeystoreEntryViewModel- Parameters:
locale- The locale to use for the description.- Returns:
- The description of the state of the certificate.
-
getSubjectDisplayName
Returns the display name of the subject of the certificate.- Specified by:
getSubjectDisplayNamein interfaceIKeystoreEntryViewModel- Returns:
- The display name of the subject of the certificate.
-
getType
Description copied from interface:IKeystoreEntryViewModelGets the type of the keystore entry.- Specified by:
getTypein interfaceIKeystoreEntryViewModel- Returns:
- The type of the keystore entry.
-
getTypeDisplayName
Description copied from interface:IKeystoreEntryViewModelReturns the localized display name of the type of the keystore entry.- Specified by:
getTypeDisplayNamein interfaceIKeystoreEntryViewModel- Parameters:
locale- The locale to use for the display name.- Returns:
- The localized display name of the type of the keystore entry.
-
isDeletable
public boolean isDeletable()Description copied from interface:IKeystoreEntryViewModelReturns whether this keystore entry is deletable or not.- Specified by:
isDeletablein interfaceIKeystoreEntryViewModel- Returns:
- Whether this keystore entry is deletable or not.
-
isDownloadable
public boolean isDownloadable()Description copied from interface:IKeystoreEntryViewModelReturns whether this keystore entry is downloadable or not.- Specified by:
isDownloadablein interfaceIKeystoreEntryViewModel- Returns:
- Whether this keystore entry is downloadable or not.
-
isHasChanged
public boolean isHasChanged() -
getOriginalDtoHashCode
public int getOriginalDtoHashCode()The original hash code of the certificate view model. This is used to detect changes in the view model. -
getCertificateInfoDto
The underlying certificate info DTO. -
getId
The (database) id of the certificate. -
getValidity
public de.xima.cmn.time.DateTimeRange getValidity()The date time range of the certificate's validity.- Specified by:
getValidityin interfaceIKeystoreEntryViewModel- Returns:
- The validity of the keystore entry.
-
getCreatedAt
The date when the certificate was created.- Specified by:
getCreatedAtin interfaceIKeystoreEntryViewModel- Returns:
- The instant when this keystore entry was created.
-
getUpdatedAt
The date when the certificate was last updated.- Specified by:
getUpdatedAtin interfaceIKeystoreEntryViewModel- Returns:
- The instant when this keystore entry was last updated.
-
getIssuer
The issuer of the certificate in the form of a distinguished name (e.g. "CN=CA, OU=IT, O=XIMA"). -
getSubject
The subject of the certificate in the form of a distinguished name (e.g. "CN=John Doe, OU=IT, O=XIMA"). -
getSerialNumber
The serial number of the certificate.- Specified by:
getSerialNumberin interfaceIKeystoreEntryViewModel- Returns:
- The serial number of the keystore entry if the keystore entry is a certificate or
nullotherwise. - See Also:
-
getKeyAlgorithm
The key algorithm of the certificate. -
getKeySize
The key size of the certificate. -
isHasCsr
public boolean isHasCsr()Whether the certificate has a CSR (Certificate Signing Request) or not. This is only applicable for certificates that are created by formcycle and signed by the formcycle CA. -
getLastCsrExport
The instant when the CSR (Certificate Signing Request) was last exported. If this isnull, the CSR has never been exported and therefore no CSR process has been initiated for this certificate. -
getLastCaResponseImport
The instant when the last CA (Certificate Authority) response was imported for this certificate. If this isnull, no CA response has been imported yet. If this isnullandlastCsrExportis notnull, it indicates that the CSR was exported, therefore a CSR process has been initiated, but no CA response has been received yet. -
getUsages
A list of the usages of the certificate sorted by their localized display name.- Specified by:
getUsagesin interfaceIKeystoreEntryViewModel
-
isHasPrivateKey
public boolean isHasPrivateKey()Whether the certificate has a private key in the database or not. -
getKeystore
The keystore that contains the certificate.- Specified by:
getKeystorein interfaceIKeystoreEntryViewModel- Returns:
- The keystore that contains this keystore entry.
-
getIssues
The issues with the certificate.- Specified by:
getIssuesin interfaceIKeystoreEntryViewModel- Returns:
- The issues with the keystore entry.
-
getTraits
Traits to filter key store entries by in the administration view.- Specified by:
getTraitsin interfaceIKeystoreEntryViewModel- Returns:
- The traits of the keystore entry.
-
getStatus
The status of the certificate, whether there are warnings or errors.- Specified by:
getStatusin interfaceIKeystoreEntryViewModel- Returns:
- The status of this keystore entry.
-
getUsageTypes
The intended usages of the certificate. -
isCanBeRenewedAutomatically
public boolean isCanBeRenewedAutomatically()Whether the certificate can be renewed automatically or not. -
equals
-
hashCode
-
toString
-