Class RepositoryAIASource

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

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

    • proxiedSource

      protected OnlineAIASource 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(OnlineAIASource proxiedSource)
      Sets a source to access an AIA in case the requested certificates are not present in the repository
      Parameters:
      proxiedSource - OnlineAIASource a source to be used to download the data when no relevant certificates is found in the repository
    • getCertificatesByAIA

      public Set<CertificateToken> getCertificatesByAIA(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<CertificateToken> getCertificatesByAIA(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
    • 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
    • findCertificates

      protected abstract Set<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

      protected abstract void insertCertificates(String aiaUrl, Collection<CertificateToken> certificateTokens)
      This method allows inserting of a certificate into the DB
      Parameters:
      aiaUrl - String AIA Url used to download the certificates
      certificateTokens - a collection of CertificateTokens 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