Interface DSSCacheFileLoader

All Superinterfaces:
DSSFileLoader, Serializable
All Known Implementing Classes:
FileCacheDataLoader, Sha2FileCacheDataLoader

public interface DSSCacheFileLoader extends DSSFileLoader
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 Type
    Method
    Description
    getDocument(String url, boolean refresh)
    This method allows to download a DSSDocument from a specified url with a custom setting indicating whether the refresh of the document's cache shall be enforced, when applicable
    Allows to load a document for a given url from the cache folder.
    boolean
    Removes the file from cache with the given url

    Methods inherited from interface eu.europa.esig.dss.spi.client.http.DSSFileLoader

    getDocument
  • Method Details

    • getDocument

      DSSDocument getDocument(String url, boolean refresh)
      This method allows to download a DSSDocument from a specified url with a custom setting indicating whether the refresh of the document's cache shall be enforced, when applicable
      Parameters:
      url - String remote location of the document to download
      refresh - indicates whether the refresh of the cached document shall be enforced
      Returns:
      DSSDocument
    • getDocumentFromCache

      DSSDocument getDocumentFromCache(String url)
      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

      boolean remove(String url)
      Removes the file from cache with the given url
      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