Module jpms_dss_spi

Class RepositoryAIASource

java.lang.Object
eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
All Implemented Interfaces:
AIASource, Serializable

public abstract class RepositoryAIASource extends Object implements AIASource
Abstract repository AIA source
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected AIASource
    Data source is used to access certificate tokens that are not present in the repository
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Default constructor instantiating object with null proxied source
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract Set<eu.europa.esig.dss.model.x509.CertificateToken>
    This method returns a set of certificates from a DB with the given key
    protected String
    getAIAKey(String aiaUrl)
    Creates a key corresponding to the given aiaUrl
    Set<eu.europa.esig.dss.model.x509.CertificateToken>
    getCertificatesByAIA(eu.europa.esig.dss.model.x509.CertificateToken certificateToken)
    Loads a set of CertificateTokens accessed by AIA URIs from the provided certificateToken
    Set<eu.europa.esig.dss.model.x509.CertificateToken>
    getCertificatesByAIA(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, boolean forceRefresh)
    This method allows to populate the source with new AIA certificates obtained from an proxied source, by forcing the refresh
    protected String
    getCertificateTokenAIAUrl(eu.europa.esig.dss.model.x509.CertificateToken certificateToken)
    Returns a caIssuers access URL
    protected abstract List<String>
    Returns a list of all existing AIA keys present in the DB
    protected String
    getUniqueCertificateAiaId(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, String aiaUrl)
    Generates a unique identifier for the CertificateToken and aiaUrl pair
    protected List<String>
    Initialize a list of AIA certificate token keys String from the given urls
    protected abstract void
    insertCertificate(String aiaKey, eu.europa.esig.dss.model.x509.CertificateToken certificateToken)
    This method allows inserting of a certificate into the DB
    protected abstract void
    insertCertificates(String aiaKey, Collection<eu.europa.esig.dss.model.x509.CertificateToken> certificateTokens)
    Deprecated.
    since DSS 5.13.
    protected abstract void
    This method removes the certificates from DB with the given aiaKey
    void
    setProxySource(AIASource proxiedSource)
    Sets a source to access an AIA in case the requested certificates are not present in the repository

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • proxiedSource

      protected AIASource proxiedSource
      Data source is used to access certificate tokens that are not present in the repository
  • Constructor Details

    • RepositoryAIASource

      protected RepositoryAIASource()
      Default constructor instantiating object with null proxied source
  • Method Details

    • setProxySource

      public void setProxySource(AIASource proxiedSource)
      Sets a source to access an AIA in case the requested certificates are not present in the repository
      Parameters:
      proxiedSource - AIASource a source to be used to download the data when no relevant certificates is found in the repository
    • getCertificatesByAIA

      public Set<eu.europa.esig.dss.model.x509.CertificateToken> getCertificatesByAIA(eu.europa.esig.dss.model.x509.CertificateToken certificateToken)
      Description copied from interface: AIASource
      Loads a set of CertificateTokens accessed by AIA URIs from the provided certificateToken
      Specified by:
      getCertificatesByAIA in interface AIASource
      Parameters:
      certificateToken - CertificateToken to get issuer candidates for
      Returns:
      a set of issuer candidates accessed by AIA URIs
    • getCertificatesByAIA

      public Set<eu.europa.esig.dss.model.x509.CertificateToken> getCertificatesByAIA(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, boolean forceRefresh)
      This method allows to populate the source with new AIA certificates obtained from an proxied source, by forcing the refresh
      Parameters:
      certificateToken - CertificateToken to get certificate chain by AIA for
      forceRefresh - defines should the related certificates be refreshed within the source
      Returns:
      a set if CertificateTokens
    • getCertificateTokenAIAUrl

      protected String getCertificateTokenAIAUrl(eu.europa.esig.dss.model.x509.CertificateToken certificateToken)
      Returns a caIssuers access URL
      Parameters:
      certificateToken - CertificateToken
      Returns:
      String
    • getExistingAIAKeys

      protected abstract List<String> getExistingAIAKeys()
      Returns a list of all existing AIA keys present in the DB
      Returns:
      a list of String AIA keys
    • initCertificateAIAKeys

      protected List<String> initCertificateAIAKeys(List<String> aiaUrls)
      Initialize a list of AIA certificate token keys String from the given urls
      Parameters:
      aiaUrls - a list of String AIA urls
      Returns:
      list of String AIA certificate keys
    • getAIAKey

      protected String getAIAKey(String aiaUrl)
      Creates a key corresponding to the given aiaUrl
      Parameters:
      aiaUrl - String URL
      Returns:
      String key
    • getUniqueCertificateAiaId

      protected String getUniqueCertificateAiaId(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, String aiaUrl)
      Generates a unique identifier for the CertificateToken and aiaUrl pair
      Parameters:
      certificateToken - CertificateToken
      aiaUrl - String
      Returns:
      String
    • findCertificates

      protected abstract Set<eu.europa.esig.dss.model.x509.CertificateToken> findCertificates(String key)
      This method returns a set of certificates from a DB with the given key
      Parameters:
      key - String the aiaKey to extract certificates by
      Returns:
      a set of CertificateTokens
    • insertCertificates

      @Deprecated protected abstract void insertCertificates(String aiaKey, Collection<eu.europa.esig.dss.model.x509.CertificateToken> certificateTokens)
      Deprecated.
      since DSS 5.13. Use #insertCertificate method instead.
      This method allows inserting of a certificate into the DB
      Parameters:
      aiaKey - String AIA key identifying an AIA access URL
      certificateTokens - a collection of CertificateTokens to insert
    • insertCertificate

      protected abstract void insertCertificate(String aiaKey, eu.europa.esig.dss.model.x509.CertificateToken certificateToken)
      This method allows inserting of a certificate into the DB
      Parameters:
      aiaKey - String AIA key identifying an AIA access URL
      certificateToken - CertificateToken to insert
    • removeCertificates

      protected abstract void removeCertificates(String aiaKey)
      This method removes the certificates from DB with the given aiaKey
      Parameters:
      aiaKey - String representing an AIA URL identifier