Interface Storage


public interface Storage
A Storage grants access to different files/objects.
Author:
Dennis Pidun, University of Hildesheim
  • Method Summary

    Modifier and Type
    Method
    Description
    Generate a pre-signed URL, so one can download (GET) the desired data.
    Get the prefix the storage is locked on.
    Lists the content under the desired prefix.
    void
    storeFile(String key, File file)
    Stores a given file based on a given key.
  • Method Details

    • getPrefix

      String getPrefix()
      Get the prefix the storage is locked on. In filesystem terminology this would be the folder the data is lying in.
      Returns:
      the prefix
    • list

      Set<String> list()
      Lists the content under the desired prefix.
      Returns:
      a set of paths
    • generateDownloadUrl

      String generateDownloadUrl(String key)
      Generate a pre-signed URL, so one can download (GET) the desired data. Use, e.g., UriResolver to transparently download a remote URL.
      Parameters:
      key - the key, mapping to a file in a folder.
      Returns:
      pre-signed Download-URL (http-protocol)
    • storeFile

      void storeFile(String key, File file) throws IOException
      Stores a given file based on a given key.
      Parameters:
      key - the key to denote the storage location
      file - the file to store
      Throws:
      IOException