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 Details

    • CertificateImportModel

      public CertificateImportModel(CertificateDetails certificateDetails, byte[] certificateData)
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getDisplayName

      public String getDisplayName(Locale locale)
      Description copied from interface: ICryptoImportElement
      The name of the cryptographic element. This is used to identify the element in the user interface.
      Specified by:
      getDisplayName in interface ICryptoImportElement
      Returns:
      the name of the cryptographic element
    • getInputStream

      public InputStream getInputStream()
      Description copied from interface: ICertificateImportModel
      Returns 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:
      getInputStream in interface ICertificateImportModel
      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.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getType

      public ECryptoImportElementType getType()
      Description copied from interface: ICryptoImportElement
      The type of the cryptographic element. This indicates whether the element is a private key, a certificate, or another type.
      Specified by:
      getType in interface ICryptoImportElement
      Returns:
      the type of the cryptographic element
    • getCertificateDetails

      public CertificateDetails getCertificateDetails()
      Description copied from interface: ICryptoImportElement
      Return 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 be null!
      Specified by:
      getCertificateDetails in interface ICryptoImportElement
      Returns:
      the certificate details, or null if not applicable
    • getCertificateData

      public byte[] getCertificateData()
    • isMarkedForImport

      public boolean isMarkedForImport()
      Description copied from interface: ICertificateImportModel
      Returns whether the certificate is marked for import.
      Specified by:
      isMarkedForImport in interface ICertificateImportModel
      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: ICertificateImportModel
      Sets whether the certificate is marked for import.
      Specified by:
      setMarkedForImport in interface ICertificateImportModel
      Parameters:
      markedForImport - true to mark the certificate for import, false to skip it during import