Interface LotlServiceCache
public interface LotlServiceCache
Interface for caching Lotl (List of Trusted Lists) service results. It provides methods to set and get various Lotl-related data, including European Lotl, country-specific Lotls, and pivot results.
Notice: If you do your own implementation of this interface, you should ensure that the cache is thread-safe and can handle concurrent access. This is important because Lotl data can be accessed and modified by multiple threads simultaneously. You should also ensure that all the values are set atomically using setAllValues(com.itextpdf.signatures.validation.lotl.EuropeanLotlFetcher.Result, com.itextpdf.signatures.validation.lotl.EuropeanResourceFetcher.Result, com.itextpdf.signatures.validation.lotl.PivotFetcher.Result, java.util.Map
method to maintain consistency, So that you are not using outdated pivot results or country-specific Lotls with a changed European Lotl.
-
Method Summary
Modifier and TypeMethodDescriptionGets the country-specific Lotl results.Gets the result of the European Resource Fetcher.Gets the European Lotl result.Gets the European Lotl result.void
setAllValues
(EuropeanLotlFetcher.Result lotlXml, EuropeanResourceFetcher.Result europeanResourceFetcherEUJournalCertificates, PivotFetcher.Result result, Map<String, CountrySpecificLotlFetcher.Result> countrySpecificResult) Sets all values related to Lotl, including European Lotl, EU Journal certificates, pivot results, and country-specific Lotls.void
setCountrySpecificLotlResult
(CountrySpecificLotlFetcher.Result countrySpecificLotlResult) Sets the country-specific Lotl result for a specific country.void
Sets the result of the European Resource Fetcher.void
Sets the European Lotl result.void
setPivotResult
(PivotFetcher.Result newResult) Sets the pivot result.
-
Method Details
-
setAllValues
void setAllValues(EuropeanLotlFetcher.Result lotlXml, EuropeanResourceFetcher.Result europeanResourceFetcherEUJournalCertificates, PivotFetcher.Result result, Map<String, CountrySpecificLotlFetcher.Result> countrySpecificResult) Sets all values related to Lotl, including European Lotl, EU Journal certificates, pivot results, and country-specific Lotls. This extra method is used for syncronized updates to the cache, ensuring that all related data is set at once. This is useful in multithreaded environments where you want to ensure that all related data is consistent.- Parameters:
-
lotlXml
- the European Lotl result -
europeanResourceFetcherEUJournalCertificates
- the EU Journal certificates -
result
- the pivot fetcher result -
countrySpecificResult
- a map of country-specific Lotl results
-
getPivotResult
PivotFetcher.Result getPivotResult()Gets the European Lotl result.- Returns:
- the European Lotl result
-
setPivotResult
Sets the pivot result.- Parameters:
-
newResult
- the new pivot result to set
-
getCountrySpecificLotls
Map<String,CountrySpecificLotlFetcher.Result> getCountrySpecificLotls()Gets the country-specific Lotl results.- Returns:
- a map of country-specific Lotl results
-
setCountrySpecificLotlResult
Sets the country-specific Lotl result for a specific country.- Parameters:
-
countrySpecificLotlResult
- the country-specific Lotl result to set
-
getLotlResult
EuropeanLotlFetcher.Result getLotlResult()Gets the European Lotl result.- Returns:
- the European Lotl result
-
setLotlResult
Sets the European Lotl result.- Parameters:
-
data
- the European Lotl result to set
-
setEuropeanResourceFetcherResult
Sets the result of the European Resource Fetcher. This method is used to update the cache with the result- Parameters:
-
result
- the result of the European Resource Fetcher
-
getEUJournalCertificates
EuropeanResourceFetcher.Result getEUJournalCertificates()Gets the result of the European Resource Fetcher.- Returns:
- the result of the European Resource Fetcher
-