Class JdbcCacheAIASource
java.lang.Object
eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
eu.europa.esig.dss.service.x509.aia.JdbcCacheAIASource
- All Implemented Interfaces:
AIASource,Serializable
The class represents a JDBC cached AIA Source
- See Also:
-
Field Summary
FieldsFields inherited from class eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
proxiedSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves table from DBprotected Set<CertificateToken>findCertificates(String key) This method returns a set of certificates from a DB with the given keyReturns a list of all existing AIA keys present in the DBvoidInitialize the table.protected voidinsertCertificates(String aiaUrl, Collection<CertificateToken> certificateTokens) This method allows inserting of a certificate into the DBbooleanChecks of the table is createdprotected voidremoveCertificates(String aiaKey) This method removes the certificates from DB with the given aiaKeyvoidsetJdbcCacheConnector(JdbcCacheConnector jdbcCacheConnector) Sets the SQL connection DataSourceMethods inherited from class eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
getCertificatesByAIA, getCertificatesByAIA, initCertificateAIAKeys, setProxySource
-
Field Details
-
jdbcCacheConnector
Connection to database
-
-
Constructor Details
-
JdbcCacheAIASource
public JdbcCacheAIASource()Default constructor with null JdbcCacheConnector
-
-
Method Details
-
setJdbcCacheConnector
Sets the SQL connection DataSource- Parameters:
jdbcCacheConnector-JdbcCacheConnector
-
findCertificates
Description copied from class:RepositoryAIASourceThis method returns a set of certificates from a DB with the given key- Specified by:
findCertificatesin classRepositoryAIASource- Parameters:
key-Stringthe aiaKey to extract certificates by- Returns:
- a set of
CertificateTokens
-
insertCertificates
Description copied from class:RepositoryAIASourceThis method allows inserting of a certificate into the DB- Specified by:
insertCertificatesin classRepositoryAIASource- Parameters:
aiaUrl-StringAIA Url used to download the certificatescertificateTokens- a collection ofCertificateTokens to insert
-
removeCertificates
Description copied from class:RepositoryAIASourceThis method removes the certificates from DB with the given aiaKey- Specified by:
removeCertificatesin classRepositoryAIASource- Parameters:
aiaKey-Stringrepresenting an AIA URL identifier
-
getExistingAIAKeys
Description copied from class:RepositoryAIASourceReturns a list of all existing AIA keys present in the DB- Specified by:
getExistingAIAKeysin classRepositoryAIASource- Returns:
- a list of
StringAIA keys
-
initTable
Initialize the table.- Throws:
SQLException- in case of SQL connection error
-
isTableExists
public boolean isTableExists()Checks of the table is created- Returns:
- TRUE if the table is created, FALSE otherwise
-
destroyTable
Removes table from DB- Throws:
SQLException- in case of error
-