lv.pasts.eme.security

## Class CertificateEntry

- java.lang.Object
- - lv.pasts.eme.security.CertificateEntry

- All Implemented Interfaces:
    Comparable<CertificateEntry>

      public class CertificateEntry
      extends Object
      implements Comparable<CertificateEntry>

  `CertificateEntry` class contains certificate data retrieved from the keystore.
  Since:
    1.3.3

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static CertificateEntry` | `REFRESH_MARKER` A marker to be used by callbacks when refresh of the certificate list is required.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CertificateEntry(String alias, X509Certificate certificate)` Creates a `CertificateEntry` object with the given alias and associated certificate.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(CertificateEntry other)` Comparable implementation.
    `static String` | `formatAlias(String tokenLabel, String tokenSerial, String certLabel, X509Certificate cert)`
    `String` | `getAlias()` Returns the alias name of the certificate.
    `X509Certificate` | `getCertificate()` Returns the associated certificate.
    `String` | `getTokenLabel()` Returns label of the token containing the certificate.
    `String` | `getTokenSerial()` Returns serial of the token containing the certificate.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### REFRESH_MARKER

          public static final CertificateEntry REFRESH_MARKER

      A marker to be used by callbacks when refresh of the certificate list is required.

  - ### Constructor Detail

    - #### CertificateEntry

          public CertificateEntry(String alias,
                                  X509Certificate certificate)

      Creates a `CertificateEntry` object with the given alias and associated certificate.
      Parameters:
        `alias` - the alias name.
        `certificate` - associated certificate.

  - ### Method Detail

    - #### getAlias

          public String getAlias()

      Returns the alias name of the certificate.
      Returns:
        the `alias` name of this certificate.

    - #### getCertificate

          public X509Certificate getCertificate()

      Returns the associated certificate.
      Returns:
        the certificate.

    - #### getTokenLabel

          public String getTokenLabel()

      Returns label of the token containing the certificate.
      Returns:
        `label` of the token or an empty string if token is unknown.

    - #### getTokenSerial

          public String getTokenSerial()

      Returns serial of the token containing the certificate.
      Returns:
        `serial` of the token or an empty string if token is unknown.

    - #### compareTo

          public int compareTo(CertificateEntry other)

      Comparable implementation.
      Specified by:
        `compareTo` in interface `Comparable<CertificateEntry>`

    - #### formatAlias

          public static String formatAlias(String tokenLabel,
                                           String tokenSerial,
                                           String certLabel,
                                           X509Certificate cert)

Copyright VAS Latvijas Valsts radio un televizijas centrs / Developed by SIA EUSO