public class EuropeanLotlService extends LotlService
lotlFetchingProperties| Constructor and Description |
|---|
EuropeanLotlService(LotlFetchingProperties lotlFetchingProperties)
Creates a new instance of
EuropeanLotlService. |
| Modifier and Type | Method and Description |
|---|---|
List<IServiceContext> |
getNationalTrustedCertificates()
Retrieves national trusted certificates.
|
ValidationReport |
getValidationResult()
Get the validation results for the List of Trusted Lists (LOTL).
|
void |
loadFromCache(InputStream stream)
Loads the cache from the provided input stream.
|
protected void |
loadFromNetwork()
Loads the cache from the network by fetching the latest LOTL data and related resources.
|
void |
serializeCache(OutputStream outputStream)
Serializes the current state of the cache to the provided output stream.
|
protected void |
tryAndRefreshCache()
This method is intended to refresh the cache, it will try to download the latest LOTL data and update the
cache accordingly.
|
LotlService |
withCountrySpecificLotlFetcher(CountrySpecificLotlFetcher countrySpecificLotlFetcher)
Sets the country-specific LOTL fetcher for the LOTL service.
|
LotlService |
withEuropeanLotlFetcher(EuropeanLotlFetcher fetcher)
Sets the European List of Trusted Lists (LOTL) byte fetcher for the LOTL service.
|
LotlService |
withEuropeanResourceFetcher(EuropeanResourceFetcher europeanResourceFetcher)
Sets the European Resource Fetcher for the
LotlService. |
LotlService |
withLotlServiceCache(LotlServiceCache cache)
Sets the cache for the
LotlService. |
LotlService |
withPivotFetcher(PivotFetcher pivotFetcher)
Sets the pivot fetcher for the LOTL service.
|
cancelTimer, close, getGlobalService, initializeCache, initializeCache, initializeGlobalCache, setupTimer, withCustomResourceRetriever, withLotlValidator, withXmlSignatureValidatorpublic EuropeanLotlService(LotlFetchingProperties lotlFetchingProperties)
EuropeanLotlService.lotlFetchingProperties - LotlFetchingProperties to configure the way in which LOTL will be fetchedpublic LotlService withLotlServiceCache(LotlServiceCache cache)
LotlService.
This method allows you to provide a custom implementation of LotlServiceCache to be used
for caching LOTL data, pivot files, and country-specific LOTLs.
withLotlServiceCache in class LotlServicecache - the custom cache to be used for caching LOTL dataLotlService for method chainingpublic void loadFromCache(InputStream stream)
The input stream should contain serialized cache data, which can be created using the
LotlService.serializeCache(OutputStream) method.
loadFromCache in class LotlServicestream - the input stream to read the cached data frompublic ValidationReport getValidationResult()
getValidationResult in class LotlServiceValidationReport containing the results of the LOTL validationpublic List<IServiceContext> getNationalTrustedCertificates()
getNationalTrustedCertificates in class LotlServicepublic LotlService withPivotFetcher(PivotFetcher pivotFetcher)
withPivotFetcher in class LotlServicepivotFetcher - the pivot fetcher to be used for fetching and validating pivot filesLotlService for method chainingpublic LotlService withCountrySpecificLotlFetcher(CountrySpecificLotlFetcher countrySpecificLotlFetcher)
withCountrySpecificLotlFetcher in class LotlServicecountrySpecificLotlFetcher - the country-specific LOTL fetcher to be used for fetching and validating
country-specific LOTLsLotlService for method chainingpublic LotlService withEuropeanLotlFetcher(EuropeanLotlFetcher fetcher)
withEuropeanLotlFetcher in class LotlServicefetcher - the fetcher to be used for fetching the LOTL XML dataLotlService for method chainingpublic LotlService withEuropeanResourceFetcher(EuropeanResourceFetcher europeanResourceFetcher)
LotlService.withEuropeanResourceFetcher in class LotlServiceeuropeanResourceFetcher - the European Resource Fetcher to be used for fetching EU journal certificatesLotlService for method chainingpublic void serializeCache(OutputStream outputStream)
serializeCache in class LotlServiceoutputStream - the output stream to which the cache will be serialized.protected void loadFromNetwork()
This method fetches the main LOTL file, EU journal certificates, pivot files, and country-specific LOTLs, validates them, and stores them in the cache.
If the main LOTL fetch fails, the method will throw a PdfException and will not proceed to fetch
pivot files or country-specific LOTLs. If a country-specific LOTL fetch fails, the
LotlFetchingProperties.getOnCountryFetchFailureStrategy() will be used to handle the failure.
Note: This method is called during cache initialization and should not be called directly in normal operation.
loadFromNetwork in class LotlServiceprotected void tryAndRefreshCache()
The rules taken into account are:
Country specific LOTL files will be fetched, validated and updated per country. If country fails to fetch,
LotlFetchingProperties.getOnCountryFetchFailureStrategy() will be used to perform corresponding action.
For the main LOTL file, if the fetch fails, the cache will not be updated. Also, we will NOT proceed to update the pivot files. If the main LOTL file is fetched successfully, the pivot files will be fetched, validated and stored in the cache.
tryAndRefreshCache in class LotlServiceCopyright © 1998–2026 Apryse Group NV. All rights reserved.