Package eu.europa.esig.dss.service.crl
Class JdbcCacheCRLSource
java.lang.Object
eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource<R>
eu.europa.esig.dss.spi.x509.revocation.JdbcRevocationSource<CRL>
eu.europa.esig.dss.service.crl.JdbcCacheCRLSource
- All Implemented Interfaces:
CRLSource,RevocationSource<CRL>,Serializable
CRLSource that retrieve information from a JDBC datasource
- See Also:
-
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.x509.revocation.JdbcRevocationSource
jdbcCacheConnectorFields inherited from class eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource
proxiedSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RevocationToken<CRL>buildRevocationTokenFromResult(JdbcCacheConnector.JdbcResultRecord resultRecord, CertificateToken certificateToken, CertificateToken issuerCertificateToken) BuildsRevocationTokenfrom the obtainedResultSetprotected StringReturns CREATE_TABLE sql queryprotected StringReturns an sql query to remove a table from DBprotected StringReturns an sql query to get revocation data from DBprotected StringReturns an sql query to remove a record from DBprotected Collection<JdbcCacheConnector.JdbcResultRequest>Returns a request to find a revocation datagetRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken) This method retrieves aRevocationTokenfor the certificateTokengetRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken, boolean forceRefresh) Retrieves a revocation token for the givenCertificateTokenprotected StringgetRevocationTokenKey(CertificateToken certificateToken, String urlString) Gets a unique revocation token identifier used to store the revocation token for thiscertificateTokenwithin a repositoryprotected StringReturns an sql query to check table existenceinitRevocationTokenKeys(CertificateToken certificateToken) Returns a revocation token keyprotected voidinsertRevocation(String revocationKey, RevocationToken<CRL> token) Inserts a new RevocationToken into the cacheprotected voidupdateRevocation(String revocationKey, RevocationToken<CRL> token) Updates the RevocationToken into cacheMethods inherited from class eu.europa.esig.dss.spi.x509.revocation.JdbcRevocationSource
destroyTable, findRevocation, initTable, isTableExists, removeRevocation, setJdbcCacheConnectorMethods inherited from class eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource
setDefaultNextUpdateDelay, setMaxNextUpdateDelay, setProxySource, setRemoveExpired
-
Constructor Details
-
JdbcCacheCRLSource
public JdbcCacheCRLSource()Default constructor
-
-
Method Details
-
getCreateTableQuery
Description copied from class:JdbcRevocationSourceReturns CREATE_TABLE sql query- Specified by:
getCreateTableQueryin classJdbcRevocationSource<CRL>- Returns:
Stringsql query
-
getTableExistenceQuery
Description copied from class:JdbcRevocationSourceReturns an sql query to check table existence- Specified by:
getTableExistenceQueryin classJdbcRevocationSource<CRL>- Returns:
Stringsql query
-
getFindRevocationQuery
Description copied from class:JdbcRevocationSourceReturns an sql query to get revocation data from DB- Specified by:
getFindRevocationQueryin classJdbcRevocationSource<CRL>- Returns:
Stringsql query
-
getRemoveRevocationTokenEntryQuery
Description copied from class:JdbcRevocationSourceReturns an sql query to remove a record from DB- Specified by:
getRemoveRevocationTokenEntryQueryin classJdbcRevocationSource<CRL>- Returns:
Stringsql query
-
getDeleteTableQuery
Description copied from class:JdbcRevocationSourceReturns an sql query to remove a table from DB- Specified by:
getDeleteTableQueryin classJdbcRevocationSource<CRL>- Returns:
Stringsql query
-
getRevocationDataExtractRequests
Description copied from class:JdbcRevocationSourceReturns a request to find a revocation data- Specified by:
getRevocationDataExtractRequestsin classJdbcRevocationSource<CRL>- Returns:
- a collection of
JdbcCacheConnector.JdbcResultRequest
-
initRevocationTokenKeys
Returns a revocation token key- Specified by:
initRevocationTokenKeysin classRepositoryRevocationSource<CRL>- Parameters:
certificateToken-CertificateToken- Returns:
- revocation token key
String
-
buildRevocationTokenFromResult
protected RevocationToken<CRL> buildRevocationTokenFromResult(JdbcCacheConnector.JdbcResultRecord resultRecord, CertificateToken certificateToken, CertificateToken issuerCertificateToken) throws DSSExternalResourceException Description copied from class:JdbcRevocationSourceBuildsRevocationTokenfrom the obtainedResultSet- Specified by:
buildRevocationTokenFromResultin classJdbcRevocationSource<CRL>- Parameters:
resultRecord- represent the extract record rowcertificateToken-CertificateTokenof certificate to get revocation data forissuerCertificateToken-CertificateTokenif issuer of the certificateToken- Returns:
RevocationToken- Throws:
DSSExternalResourceException- if an exception occurs during the attempt to extract token
-
insertRevocation
Description copied from class:RepositoryRevocationSourceInserts a new RevocationToken into the cache- Specified by:
insertRevocationin classRepositoryRevocationSource<CRL>- Parameters:
revocationKey-Stringtoken-RevocationToken
-
updateRevocation
Description copied from class:RepositoryRevocationSourceUpdates the RevocationToken into cache- Specified by:
updateRevocationin classRepositoryRevocationSource<CRL>- Parameters:
revocationKey-Stringtoken-RevocationToken
-
getRevocationToken
public CRLToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken) Description copied from interface:RevocationSourceThis method retrieves aRevocationTokenfor the certificateToken- Specified by:
getRevocationTokenin interfaceCRLSource- Specified by:
getRevocationTokenin interfaceRevocationSource<CRL>- Overrides:
getRevocationTokenin classRepositoryRevocationSource<CRL>- Parameters:
certificateToken- TheCertificateTokenfor which the request is madeissuerCertificateToken- TheCertificateTokenwhich is the issuer of the certificateToken- Returns:
- an instance of
RevocationToken
-
getRevocationToken
public CRLToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken, boolean forceRefresh) Description copied from class:RepositoryRevocationSourceRetrieves a revocation token for the givenCertificateToken- Overrides:
getRevocationTokenin classRepositoryRevocationSource<CRL>- Parameters:
certificateToken-CertificateTokenissuerCertificateToken-CertificateTokenof the issuer of certificateTokenforceRefresh- if true, explicitly skips the cache- Returns:
RevocationToken
-
getRevocationTokenKey
Description copied from class:RepositoryRevocationSourceGets a unique revocation token identifier used to store the revocation token for thiscertificateTokenwithin a repository- Specified by:
getRevocationTokenKeyin classRepositoryRevocationSource<CRL>- Parameters:
certificateToken-CertificateTokenurlString-Stringrepresenting a URL used to download the revocation token from- Returns:
Stringrevocation token key
-