Class CacheAccessByKey
java.lang.Object
eu.europa.esig.dss.tsl.cache.access.ReadOnlyCacheAccessByKey
eu.europa.esig.dss.tsl.cache.access.CacheAccessByKey
Accesses a cache records by the specified key
-
Field Summary
Fields inherited from class eu.europa.esig.dss.tsl.cache.access.ReadOnlyCacheAccessByKey
downloadCache, key, parsingCache, validationCache
-
Constructor Summary
ConstructorDescriptionCacheAccessByKey
(CacheKey key, DownloadCache downloadCache, ParsingCache parsingCache, ValidationCache validationCache) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes the entry from downloadCache if its value is TO_BE_DELETEDvoid
Removes the entry from parsingCache if its value is TO_BE_DELETEDvoid
Removes the entry from parsingCache if its value is TO_BE_DELETEDvoid
Sets the download errorvoid
Sets the parsing record to the expired statevoid
Expires the validation recordReturns the CacheKeyboolean
Checks if the entry must be deleted from the file cache (download cache)boolean
Gets of the parsing refresh is neededboolean
isUpToDate
(XmlDownloadResult xmlDownloadResult) Checks if the download result is up to date for the given keyboolean
Gets if the validation refresh is neededvoid
Sets the parsing errorvoid
update
(XmlDownloadResult result) Updates the download resultvoid
update
(AbstractParsingResult parsingResult) Updates the parsing resultvoid
update
(ValidationResult validationResult) Updates the validation recordvoid
Sets the validation errorMethods inherited from class eu.europa.esig.dss.tsl.cache.access.ReadOnlyCacheAccessByKey
getDownloadReadOnlyResult, getParsingReadOnlyResult, getValidationReadOnlyResult
-
Constructor Details
-
CacheAccessByKey
public CacheAccessByKey(CacheKey key, DownloadCache downloadCache, ParsingCache parsingCache, ValidationCache validationCache) Default constructor- Parameters:
key
-CacheKey
to usedownloadCache
-DownloadCache
parsingCache
-ParsingCache
validationCache
-ValidationCache
-
-
Method Details
-
getCacheKey
-
isUpToDate
Checks if the download result is up to date for the given key- Parameters:
xmlDownloadResult
-XmlDownloadResult
- Returns:
- TRUE if the download result matches, FALSE otherwise
-
update
Updates the download result- Parameters:
result
-XmlDownloadResult
to store
-
downloadError
-
isParsingRefreshNeeded
public boolean isParsingRefreshNeeded()Gets of the parsing refresh is needed- Returns:
- TRUE if the parsing refresh is needed, FALSE otherwise
-
update
Updates the parsing result- Parameters:
parsingResult
-AbstractParsingResult
to store
-
expireParsing
public void expireParsing()Sets the parsing record to the expired state -
parsingError
-
isValidationRefreshNeeded
public boolean isValidationRefreshNeeded()Gets if the validation refresh is needed- Returns:
- TRUE if the validation refresh is needed, FALSE otherwise
-
expireValidation
public void expireValidation()Expires the validation record -
update
Updates the validation record- Parameters:
validationResult
-ValidationResult
to store
-
validationError
-
isFileNeedToBeDeleted
public boolean isFileNeedToBeDeleted()Checks if the entry must be deleted from the file cache (download cache)- Returns:
- TRUE if the entry need to be deleted, FALSE otherwise
-
deleteDownloadCacheIfNeeded
public void deleteDownloadCacheIfNeeded()Removes the entry from downloadCache if its value is TO_BE_DELETED -
deleteParsingCacheIfNeeded
public void deleteParsingCacheIfNeeded()Removes the entry from parsingCache if its value is TO_BE_DELETED -
deleteValidationCacheIfNeeded
public void deleteValidationCacheIfNeeded()Removes the entry from parsingCache if its value is TO_BE_DELETED
-