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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classRepresents an AIA record extracted from the SQL database table -
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 keyprotected SqlSelectQueryReturns an SQL query to extract AIA certificates from a tableprotected SqlSelectQueryReturns an SQL query to extract stored AIA keys in a tableprotected SqlQueryReturns CREATE_TABLE sql queryprotected SqlQueryReturns an sql query to remove a table from DBReturns a list of all existing AIA keys present in the DBprotected SqlQueryReturns an SQL query to insert a new CRL to a tableprotected SqlQueryReturns an sql query to remove a record from DBprotected SqlQueryReturns an sql query to check table existencevoidInitialize the table.protected voidinsertCertificate(String aiaKey, 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
getAIAKey, getCertificatesByAIA, getCertificatesByAIA, getCertificateTokenAIAUrl, getUniqueCertificateAiaId, 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
-
getCreateTableQuery
-
getTableExistenceQuery
-
getDeleteTableQuery
-
getInsertCertificateTokenEntryQuery
-
getRemoveCertificateTokenEntryQuery
-
getAIACertificatesExtractQuery
Returns an SQL query to extract AIA certificates from a table- Returns:
SqlSelectQuery
-
getAIAKeysExtractQuery
Returns an SQL query to extract stored AIA keys in a table- Returns:
SqlSelectQuery
-
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
-
insertCertificate
Description copied from class:RepositoryAIASourceThis method allows inserting of a certificate into the DB- Specified by:
insertCertificatein classRepositoryAIASource- Parameters:
aiaKey-StringAIA key identifying an AIA access URLcertificateTokens-CertificateTokento 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
-