java.lang.Object
eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
- All Implemented Interfaces:
AIASource,Serializable
Abstract repository AIA source
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AIASourceData source is used to access certificate tokens that are not present in the repository -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor instantiating object with null proxied source -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 keyprotected StringCreates a key corresponding to the givenaiaUrlSet<eu.europa.esig.dss.model.x509.CertificateToken> getCertificatesByAIA(eu.europa.esig.dss.model.x509.CertificateToken certificateToken) Loads a set ofCertificateTokens accessed by AIA URIs from the providedcertificateTokenSet<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 refreshprotected StringgetCertificateTokenAIAUrl(eu.europa.esig.dss.model.x509.CertificateToken certificateToken) Returns a caIssuers access URLReturns a list of all existing AIA keys present in the DBprotected StringgetUniqueCertificateAiaId(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, String aiaUrl) Generates a unique identifier for theCertificateTokenandaiaUrlpairinitCertificateAIAKeys(List<String> aiaUrls) Initialize a list of AIA certificate token keysStringfrom the given urlsprotected abstract voidinsertCertificate(String aiaKey, eu.europa.esig.dss.model.x509.CertificateToken certificateToken) This method allows inserting of a certificate into the DBprotected abstract voidinsertCertificates(String aiaKey, Collection<eu.europa.esig.dss.model.x509.CertificateToken> certificateTokens) Deprecated.since DSS 5.13.protected abstract voidremoveCertificates(String aiaKey) This method removes the certificates from DB with the given aiaKeyvoidsetProxySource(AIASource proxiedSource) Sets a source to access an AIA in case the requested certificates are not present in the repository
-
Field Details
-
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
Sets a source to access an AIA in case the requested certificates are not present in the repository- Parameters:
proxiedSource-AIASourcea 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:AIASourceLoads a set ofCertificateTokens accessed by AIA URIs from the providedcertificateToken- Specified by:
getCertificatesByAIAin interfaceAIASource- Parameters:
certificateToken-CertificateTokento 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-CertificateTokento get certificate chain by AIA forforceRefresh- 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
Returns a list of all existing AIA keys present in the DB- Returns:
- a list of
StringAIA keys
-
initCertificateAIAKeys
Initialize a list of AIA certificate token keysStringfrom the given urls -
getAIAKey
Creates a key corresponding to the givenaiaUrl -
getUniqueCertificateAiaId
protected String getUniqueCertificateAiaId(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, String aiaUrl) Generates a unique identifier for theCertificateTokenandaiaUrlpair -
findCertificates
This method returns a set of certificates from a DB with the given key- Parameters:
key-Stringthe 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#insertCertificatemethod instead.This method allows inserting of a certificate into the DB- Parameters:
aiaKey-StringAIA key identifying an AIA access URLcertificateTokens- a collection ofCertificateTokens 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-StringAIA key identifying an AIA access URLcertificateToken-CertificateTokento insert
-
removeCertificates
This method removes the certificates from DB with the given aiaKey- Parameters:
aiaKey-Stringrepresenting an AIA URL identifier
-