Interface Storage
public interface Storage
A Storage grants access to different files/objects.
- Author:
- Dennis Pidun, University of Hildesheim
-
Method Summary
Modifier and TypeMethodDescriptionGenerate a pre-signed URL, so one can download (GET) the desired data.Get the prefix the storage is locked on.list()Lists the content under the desired prefix.voidStores 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
Lists the content under the desired prefix.- Returns:
- a set of paths
-
generateDownloadUrl
Generate a pre-signed URL, so one can download (GET) the desired data. Use, e.g.,UriResolverto transparently download a remote URL.- Parameters:
key- the key, mapping to a file in a folder.- Returns:
- pre-signed Download-URL (http-protocol)
-
storeFile
Stores a given file based on a given key.- Parameters:
key- the key to denote the storage locationfile- the file to store- Throws:
IOException
-