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
Modifier and TypeClassDescriptionprotected static class
Represents an AIA record extracted from the SQL database table -
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
proxiedSource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes table from DBprotected Set
<CertificateToken> findCertificates
(String key) This method returns a set of certificates from a DB with the given keyprotected SqlSelectQuery
Returns an SQL query to extract AIA certificates from a tableprotected SqlSelectQuery
Returns an SQL query to extract stored AIA keys in a tableprotected SqlQuery
Returns CREATE_TABLE sql queryprotected SqlQuery
Returns an sql query to remove a table from DBReturns a list of all existing AIA keys present in the DBprotected SqlQuery
Returns an SQL query to insert a new CRL to a tableprotected SqlQuery
Returns an sql query to remove a record from DBprotected SqlQuery
Returns an sql query to check table existencevoid
Initialize the table.protected void
insertCertificate
(String aiaKey, CertificateToken certificateTokens) This method allows inserting of a certificate into the DBboolean
Checks of the table is createdprotected void
removeCertificates
(String aiaKey) This method removes the certificates from DB with the given aiaKeyvoid
setJdbcCacheConnector
(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:RepositoryAIASource
This method returns a set of certificates from a DB with the given key- Specified by:
findCertificates
in classRepositoryAIASource
- Parameters:
key
-String
the aiaKey to extract certificates by- Returns:
- a set of
CertificateToken
s
-
insertCertificate
Description copied from class:RepositoryAIASource
This method allows inserting of a certificate into the DB- Specified by:
insertCertificate
in classRepositoryAIASource
- Parameters:
aiaKey
-String
AIA key identifying an AIA access URLcertificateTokens
-CertificateToken
to insert
-
removeCertificates
Description copied from class:RepositoryAIASource
This method removes the certificates from DB with the given aiaKey- Specified by:
removeCertificates
in classRepositoryAIASource
- Parameters:
aiaKey
-String
representing an AIA URL identifier
-
getExistingAIAKeys
Description copied from class:RepositoryAIASource
Returns a list of all existing AIA keys present in the DB- Specified by:
getExistingAIAKeys
in classRepositoryAIASource
- Returns:
- a list of
String
AIA 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
-