Class JdbcCacheOCSPSource
java.lang.Object
eu.europa.esig.dss.spi.x509.revocation.RepositoryRevocationSource<OCSP>
eu.europa.esig.dss.spi.x509.revocation.JdbcRevocationSource<OCSP>
eu.europa.esig.dss.service.ocsp.JdbcCacheOCSPSource
- All Implemented Interfaces:
MultipleRevocationSource<OCSP>, OCSPSource, RevocationSource<OCSP>, Serializable
OCSPSource that retrieve information from a JDBC data-source.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classRepresents an OCSP record extracted from the SQL database table -
Field Summary
Fields inherited from class RepositoryRevocationSource
proxiedSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected RevocationToken<OCSP> buildRevocationTokenFromResult(SqlRecord response, CertificateToken certificateToken, CertificateToken issuerCert) 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) Initialize a list of revocation token keysStringfrom the givenCertificateTokenprotected voidinsertRevocation(String revocationKey, RevocationToken<OCSP> token) Inserts a new RevocationToken into the cacheprotected voidupdateRevocation(String revocationKey, RevocationToken<OCSP> token) Updates the currently stored OCSP token for the givenkeywith suppliedtoken.Methods inherited from class JdbcRevocationSource
destroyTable, findRevocations, getJdbcCacheConnector, initTable, isTableExists, removeRevocation, setJdbcCacheConnectorMethods inherited from class RepositoryRevocationSource
getRevocationSourceUrl, getRevocationTokens, getRevocationTokens, isNotExpired, setDefaultNextUpdateDelay, setMaxNextUpdateDelay, setProxySource, setRemoveExpired
-
Constructor Details
-
JdbcCacheOCSPSource
public JdbcCacheOCSPSource()Default constructor
-
-
Method Details
-
getCreateTableQuery
Description copied from class:JdbcRevocationSourceReturns CREATE_TABLE sql query- Specified by:
getCreateTableQueryin classJdbcRevocationSource<OCSP>- Returns:
SqlQuery
-
getTableExistenceQuery
Description copied from class:JdbcRevocationSourceReturns an sql query to check table existence- Specified by:
getTableExistenceQueryin classJdbcRevocationSource<OCSP>- Returns:
SqlQuery
-
getDeleteTableQuery
Description copied from class:JdbcRevocationSourceReturns an sql query to remove a table from DB- Specified by:
getDeleteTableQueryin classJdbcRevocationSource<OCSP>- Returns:
SqlQuery
-
getInsertRevocationTokenEntryQuery
Description copied from class:JdbcRevocationSourceReturns an SQL query to insert a new revocation token to a table- Specified by:
getInsertRevocationTokenEntryQueryin classJdbcRevocationSource<OCSP>- Returns:
SqlQuery
-
getUpdateRevocationTokenEntryQuery
Description copied from class:JdbcRevocationSourceReturns an SQL query to update a revocation token in a table- Specified by:
getUpdateRevocationTokenEntryQueryin classJdbcRevocationSource<OCSP>- Returns:
SqlQuery
-
getRemoveRevocationTokenEntryQuery
Description copied from class:JdbcRevocationSourceReturns an sql query to remove a revocation token from DB- Specified by:
getRemoveRevocationTokenEntryQueryin classJdbcRevocationSource<OCSP>- Returns:
SqlQuery
-
getRevocationDataExtractQuery
Description copied from class:JdbcRevocationSourceReturns a request to find a revocation data- Specified by:
getRevocationDataExtractQueryin classJdbcRevocationSource<OCSP>- Returns:
SqlSelectQuery
-
initRevocationTokenKeys
Description copied from class:RepositoryRevocationSourceInitialize a list of revocation token keysStringfrom the givenCertificateToken- Specified by:
initRevocationTokenKeysin classRepositoryRevocationSource<OCSP>- Parameters:
certificateToken-CertificateToken- Returns:
- list of
Stringrevocation keys
-
buildRevocationTokenFromResult
protected RevocationToken<OCSP> buildRevocationTokenFromResult(SqlRecord response, CertificateToken certificateToken, CertificateToken issuerCert) throws DSSExternalResourceException Description copied from class:JdbcRevocationSourceBuildsRevocationTokenfrom the obtainedResultSet- Specified by:
buildRevocationTokenFromResultin classJdbcRevocationSource<OCSP>- Parameters:
response-SqlRecordrepresent the extracted record rowcertificateToken-CertificateTokenof certificate to get revocation data forissuerCert-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<OCSP>- Parameters:
revocationKey-Stringtoken-RevocationToken
-
updateRevocation
Updates the currently stored OCSP token for the givenkeywith suppliedtoken.- Specified by:
updateRevocationin classRepositoryRevocationSource<OCSP>- Parameters:
revocationKey-Stringthe key of the revocation data to be updatedtoken- new OCSP token
-
getRevocationToken
public OCSPToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken) Description copied from interface:RevocationSourceThis method retrieves aRevocationTokenfor the certificateToken- Specified by:
getRevocationTokenin interfaceOCSPSource- Specified by:
getRevocationTokenin interfaceRevocationSource<OCSP>- Overrides:
getRevocationTokenin classRepositoryRevocationSource<OCSP>- Parameters:
certificateToken- TheCertificateTokenfor which the request is madeissuerCertificateToken- TheCertificateTokenwhich is the issuer of the certificateToken- Returns:
- an instance of
RevocationToken
-
getRevocationToken
public OCSPToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken, boolean forceRefresh) Description copied from class:RepositoryRevocationSourceRetrieves a revocation token for the givenCertificateToken- Overrides:
getRevocationTokenin classRepositoryRevocationSource<OCSP>- 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<OCSP>- 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<OCSP>- Parameters:
certificateToken-CertificateTokenurlString-Stringrepresenting a URL used to download the revocation token from- Returns:
Stringrevocation token key
-