Package eu.europa.esig.dss.service.crl
Class JdbcCacheCRLSource
java.lang.Object
eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource<T>
eu.europa.esig.dss.spi.x509.revocation.JdbcRevocationSource<CRLToken>
eu.europa.esig.dss.service.crl.JdbcCacheCRLSource
- All Implemented Interfaces:
CRLSource
,RevocationSource<CRLToken>
,Serializable
public class JdbcCacheCRLSource extends JdbcRevocationSource<CRLToken> implements CRLSource
CRLSource that retrieve information from a JDBC datasource
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource
proxiedSource
-
Constructor Summary
Constructors Constructor Description JdbcCacheCRLSource()
-
Method Summary
Modifier and Type Method Description protected CRLToken
buildRevocationTokenFromResult(ResultSet rs, CertificateToken certificateToken, CertificateToken issuerCert)
BuildRevocationToken
from the obtainedResultSet
protected String
getCreateTableQuery()
Returns CREATE_TABLE sql queryprotected String
getDeleteTableQuery()
Returns an sql query to remove a table from DBprotected String
getFindRevocationQuery()
Returns an sql query to get revocation data from DBprotected String
getRemoveRevocationTokenEntryQuery()
Returns an sql query to remove a record from DBprotected String
getTableExistenceQuery()
Returns an sql query to check table existenceList<String>
initRevocationTokenKey(CertificateToken certificateToken)
Returns a revocation token keyprotected void
insertRevocation(CRLToken token)
Insert a new CRL into the cacheprotected void
updateRevocation(CRLToken token)
Update the cache with the CRLMethods inherited from class eu.europa.esig.dss.spi.x509.revocation.JdbcRevocationSource
closeQuietly, destroyTable, findRevocation, initTable, isTableExists, removeRevocation, rollback, setDataSource
Methods inherited from class eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource
getRevocationToken, getRevocationToken, setDefaultNextUpdateDelay, setMaxNextUpdateDelay, setProxySource, setRemoveExpired
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface eu.europa.esig.dss.spi.x509.revocation.RevocationSource
getRevocationToken
-
Constructor Details
-
JdbcCacheCRLSource
public JdbcCacheCRLSource()
-
-
Method Details
-
getCreateTableQuery
Description copied from class:JdbcRevocationSource
Returns CREATE_TABLE sql query- Specified by:
getCreateTableQuery
in classJdbcRevocationSource<CRLToken>
- Returns:
String
sql query
-
getTableExistenceQuery
Description copied from class:JdbcRevocationSource
Returns an sql query to check table existence- Specified by:
getTableExistenceQuery
in classJdbcRevocationSource<CRLToken>
- Returns:
String
sql query
-
getFindRevocationQuery
Description copied from class:JdbcRevocationSource
Returns an sql query to get revocation data from DB- Specified by:
getFindRevocationQuery
in classJdbcRevocationSource<CRLToken>
- Returns:
String
sql query
-
getRemoveRevocationTokenEntryQuery
Description copied from class:JdbcRevocationSource
Returns an sql query to remove a record from DB- Specified by:
getRemoveRevocationTokenEntryQuery
in classJdbcRevocationSource<CRLToken>
- Returns:
String
sql query
-
getDeleteTableQuery
Description copied from class:JdbcRevocationSource
Returns an sql query to remove a table from DB- Specified by:
getDeleteTableQuery
in classJdbcRevocationSource<CRLToken>
- Returns:
String
sql query
-
initRevocationTokenKey
Returns a revocation token key- Specified by:
initRevocationTokenKey
in classRepositoryRevocationSource<CRLToken>
- Parameters:
certificateToken
-CertificateToken
- Returns:
- revocation token key
String
-
buildRevocationTokenFromResult
protected CRLToken buildRevocationTokenFromResult(ResultSet rs, CertificateToken certificateToken, CertificateToken issuerCert)Description copied from class:JdbcRevocationSource
BuildRevocationToken
from the obtainedResultSet
- Specified by:
buildRevocationTokenFromResult
in classJdbcRevocationSource<CRLToken>
- Parameters:
rs
-ResultSet
answer from DBcertificateToken
-CertificateToken
of certificate to get revocation data forissuerCert
-CertificateToken
if issuer of the certificateToken- Returns:
RevocationToken
-
insertRevocation
Insert a new CRL into the cache- Specified by:
insertRevocation
in classRepositoryRevocationSource<CRLToken>
- Parameters:
token
-CRLToken
-
updateRevocation
Update the cache with the CRL- Specified by:
updateRevocation
in classRepositoryRevocationSource<CRLToken>
- Parameters:
token
-CRLToken
-