Interface DSSCacheFileLoader
- All Superinterfaces:
DSSFileLoader,Serializable
- All Known Implementing Classes:
FileCacheDataLoader,Sha2FileCacheDataLoader
This class implements a file loader implementing a caching mechanism, allowing to remove
cache externally (to be used within a
CacheCleaner)-
Method Summary
Modifier and TypeMethodDescriptiongetDocument(String url, boolean refresh) This method allows to download aDSSDocumentfrom a specifiedurlwith a custom setting indicating whether therefreshof the document's cache shall be enforced, when applicableAllows to load a document for a given url from the cache folder.booleanRemoves the file from cache with the given urlMethods inherited from interface eu.europa.esig.dss.spi.client.http.DSSFileLoader
getDocument
-
Method Details
-
getDocument
This method allows to download aDSSDocumentfrom a specifiedurlwith a custom setting indicating whether therefreshof the document's cache shall be enforced, when applicable- Parameters:
url-Stringremote location of the document to downloadrefresh- indicates whether the refresh of the cached document shall be enforced- Returns:
DSSDocument
-
getDocumentFromCache
Allows to load a document for a given url from the cache folder. If the document is not found in the cache, returns NULL.- Parameters:
url-Stringurl of the file- Returns:
DSSDocumentor NULL if the file does not exist
-
remove
Removes the file from cache with the given url- Specified by:
removein interfaceDSSFileLoader- Parameters:
url-Stringurl of the remote file location (the same what was used on file saving)- Returns:
- TRUE when file was successfully deleted, FALSE otherwise
-