Package eu.europa.esig.dss.service.crl
Class JdbcCacheCRLSource
java.lang.Object
eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource<CRL>
eu.europa.esig.dss.spi.x509.revocation.JdbcRevocationSource<CRL>
eu.europa.esig.dss.service.crl.JdbcCacheCRLSource
- All Implemented Interfaces:
CRLSource,MultipleRevocationSource<CRL>,RevocationSource<CRL>,Serializable
CRLSource that retrieve information from a JDBC datasource
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classRepresents a CRL record extracted from the SQL database table -
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource
proxiedSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RevocationToken<CRL> buildRevocationTokenFromResult(SqlRecord response, CertificateToken certificateToken, CertificateToken issuerCertificateToken) BuildsRevocationTokenfrom the obtainedResultSetprotected SqlQueryReturns CREATE_TABLE sql queryprotected SqlQueryReturns an sql query to remove a table from DBprotected SqlQueryReturns an SQL query to insert a new revocation token to a tableprotected SqlQueryReturns an sql query to remove a revocation token from DBgetRevocationAccessUrls(CertificateToken certificateToken) Returns a revocation access URLs of the given revocation type for the providedCertificateTokenprotected SqlSelectQueryReturns 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 SqlQueryReturns an sql query to check table existenceprotected SqlQueryReturns an SQL query to update a revocation token in a tableinitRevocationTokenKeys(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, findRevocations, getJdbcCacheConnector, initTable, isTableExists, removeRevocation, setJdbcCacheConnectorMethods inherited from class eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource
getRevocationSourceUrl, getRevocationTokens, getRevocationTokens, isNotExpired, 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:
SqlQuery
-
getTableExistenceQuery
Description copied from class:JdbcRevocationSourceReturns an sql query to check table existence- Specified by:
getTableExistenceQueryin classJdbcRevocationSource<CRL>- Returns:
SqlQuery
-
getInsertRevocationTokenEntryQuery
Description copied from class:JdbcRevocationSourceReturns an SQL query to insert a new revocation token to a table- Specified by:
getInsertRevocationTokenEntryQueryin classJdbcRevocationSource<CRL>- Returns:
SqlQuery
-
getUpdateRevocationTokenEntryQuery
Description copied from class:JdbcRevocationSourceReturns an SQL query to update a revocation token in a table- Specified by:
getUpdateRevocationTokenEntryQueryin classJdbcRevocationSource<CRL>- Returns:
SqlQuery
-
getRemoveRevocationTokenEntryQuery
Description copied from class:JdbcRevocationSourceReturns an sql query to remove a revocation token from DB- Specified by:
getRemoveRevocationTokenEntryQueryin classJdbcRevocationSource<CRL>- Returns:
SqlQuery
-
getDeleteTableQuery
Description copied from class:JdbcRevocationSourceReturns an sql query to remove a table from DB- Specified by:
getDeleteTableQueryin classJdbcRevocationSource<CRL>- Returns:
SqlQuery
-
getRevocationDataExtractQuery
Description copied from class:JdbcRevocationSourceReturns a request to find a revocation data- Specified by:
getRevocationDataExtractQueryin classJdbcRevocationSource<CRL>- Returns:
SqlSelectQuery
-
initRevocationTokenKeys
Returns a revocation token key- Specified by:
initRevocationTokenKeysin classRepositoryRevocationSource<CRL>- Parameters:
certificateToken-CertificateToken- Returns:
- revocation token key
String
-
buildRevocationTokenFromResult
protected RevocationToken<CRL> buildRevocationTokenFromResult(SqlRecord response, CertificateToken certificateToken, CertificateToken issuerCertificateToken) throws DSSExternalResourceException Description copied from class:JdbcRevocationSourceBuildsRevocationTokenfrom the obtainedResultSet- Specified by:
buildRevocationTokenFromResultin classJdbcRevocationSource<CRL>- Parameters:
response-SqlRecordrepresent the extracted 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
-
getRevocationAccessUrls
Description copied from class:RepositoryRevocationSourceReturns a revocation access URLs of the given revocation type for the providedCertificateToken- Specified by:
getRevocationAccessUrlsin classRepositoryRevocationSource<CRL>- Parameters:
certificateToken-CertificateTokento get revocation URLs for- Returns:
- a list of
StringURLs
-
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
-