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 aDSSDocument
from a specifiedurl
with a custom setting indicating whether therefresh
of the document's cache shall be enforced, when applicableAllows to load a document for a given url from the cache folder.boolean
Removes 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 aDSSDocument
from a specifiedurl
with a custom setting indicating whether therefresh
of the document's cache shall be enforced, when applicable- Parameters:
url
-String
remote 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
-String
url of the file- Returns:
DSSDocument
or NULL if the file does not exist
-
remove
Removes the file from cache with the given url- Specified by:
remove
in interfaceDSSFileLoader
- Parameters:
url
-String
url of the remote file location (the same what was used on file saving)- Returns:
- TRUE when file was successfully deleted, FALSE otherwise
-