Package eu.europa.esig.dss.spi.x509.aia
Class RepositoryAIASource
java.lang.Object
eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
- All Implemented Interfaces:
AIASource
,Serializable
- Direct Known Subclasses:
JdbcCacheAIASource
Abstract repository AIA source
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected AIASource
Data source is used to access certificate tokens that are not present in the repository -
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructor instantiating object with null proxied source -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Set
<CertificateToken> findCertificates
(String key) This method returns a set of certificates from a DB with the given keyprotected String
Creates a key corresponding to the givenaiaUrl
getCertificatesByAIA
(CertificateToken certificateToken) Loads a set ofCertificateToken
s accessed by AIA URIs from the providedcertificateToken
getCertificatesByAIA
(CertificateToken certificateToken, boolean forceRefresh) This method allows to populate the source with new AIA certificates obtained from an proxied source, by forcing the refreshprotected String
getCertificateTokenAIAUrl
(CertificateToken certificateToken) Returns a caIssuers access URLReturns a list of all existing AIA keys present in the DBprotected String
getUniqueCertificateAiaId
(CertificateToken certificateToken, String aiaUrl) Generates a unique identifier for theCertificateToken
andaiaUrl
pairinitCertificateAIAKeys
(List<String> aiaUrls) Initialize a list of AIA certificate token keysString
from the given urlsprotected abstract void
insertCertificate
(String aiaKey, CertificateToken certificateToken) This method allows inserting of a certificate into the DBprotected abstract void
removeCertificates
(String aiaKey) This method removes the certificates from DB with the given aiaKeyvoid
setProxySource
(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
-
getCertificatesByAIA
Description copied from interface:AIASource
Loads a set ofCertificateToken
s accessed by AIA URIs from the providedcertificateToken
- Specified by:
getCertificatesByAIA
in interfaceAIASource
- 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 forforceRefresh
- defines should the related certificates be refreshed within the source- Returns:
- a set if
CertificateToken
s
-
getCertificateTokenAIAUrl
Returns a caIssuers access URL- Parameters:
certificateToken
-CertificateToken
- Returns:
String
-
getExistingAIAKeys
-
initCertificateAIAKeys
-
getAIAKey
-
getUniqueCertificateAiaId
Generates a unique identifier for theCertificateToken
andaiaUrl
pair- Parameters:
certificateToken
-CertificateToken
aiaUrl
-String
- Returns:
String
-
findCertificates
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
CertificateToken
s
-
insertCertificate
This method allows inserting of a certificate into the DB- Parameters:
aiaKey
-String
AIA key identifying an AIA access URLcertificateToken
-CertificateToken
to insert
-
removeCertificates
-