Class CertificateImportModel
- java.lang.Object
-
- de.xima.fc.certificate.gui.internal.importing.CertificateImportModel
-
- All Implemented Interfaces:
ICertificateImportModel,ICryptoImportElement
public class CertificateImportModel extends Object implements ICertificateImportModel
-
-
Constructor Summary
Constructors Constructor Description CertificateImportModel(CertificateDetails certificateDetails, byte[] certificateData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)byte[]getCertificateData()CertificateDetailsgetCertificateDetails()Return information about the X.509 certificate associated with this entry.StringgetDisplayName(Locale locale)The name of the cryptographic element.InputStreamgetInputStream()Returns an InputStream that provides the data of the certificate to be imported.X501DistinguishedNamegetSubjectAlternative()Returns the subject of the certificate by selecting the first applicable Subject Alternative Name (SAN) entry.ECryptoImportElementTypegetType()The type of the cryptographic element.inthashCode()booleanisMarkedForImport()Returns whether the certificate is marked for import.voidsetMarkedForImport(boolean markedForImport)Sets whether the certificate is marked for import.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.xima.fc.certificate.gui.internal.importing.ICryptoImportElement
getNotImportableReason, isImportable
-
-
-
-
Constructor Detail
-
CertificateImportModel
public CertificateImportModel(CertificateDetails certificateDetails, byte[] certificateData)
-
-
Method Detail
-
getDisplayName
public String getDisplayName(Locale locale)
Description copied from interface:ICryptoImportElementThe name of the cryptographic element. This is used to identify the element in the user interface.- Specified by:
getDisplayNamein interfaceICryptoImportElement- Returns:
- the name of the cryptographic element
-
getInputStream
public InputStream getInputStream()
Description copied from interface:ICertificateImportModelReturns an InputStream that provides the data of the certificate to be imported. This stream should be closed by the caller after use to free resources.- Specified by:
getInputStreamin interfaceICertificateImportModel- Returns:
- an InputStream containing the certificate data
-
getSubjectAlternative
public X501DistinguishedName getSubjectAlternative()
Returns the subject of the certificate by selecting the first applicable Subject Alternative Name (SAN) entry.- Returns:
- the subject alternative name as an
X501DistinguishedName, or null if no SAN entries are available.
-
getType
public ECryptoImportElementType getType()
Description copied from interface:ICryptoImportElementThe type of the cryptographic element. This indicates whether the element is a private key, a certificate, or another type.- Specified by:
getTypein interfaceICryptoImportElement- Returns:
- the type of the cryptographic element
-
getCertificateDetails
public CertificateDetails getCertificateDetails()
Description copied from interface:ICryptoImportElementReturn information about the X.509 certificate associated with this entry. This includes details such as the subject name, fingerprint, and usage information of the certificate. Could benull!- Specified by:
getCertificateDetailsin interfaceICryptoImportElement- Returns:
- the certificate details, or
nullif not applicable
-
getCertificateData
public byte[] getCertificateData()
-
isMarkedForImport
public boolean isMarkedForImport()
Description copied from interface:ICertificateImportModelReturns whether the certificate is marked for import.- Specified by:
isMarkedForImportin interfaceICertificateImportModel- Returns:
- true if the certificate is marked for import, false otherwise (will be skipped during import)
-
setMarkedForImport
public void setMarkedForImport(boolean markedForImport)
Description copied from interface:ICertificateImportModelSets whether the certificate is marked for import.- Specified by:
setMarkedForImportin interfaceICertificateImportModel- Parameters:
markedForImport- true to mark the certificate for import, false to skip it during import
-
-