Class DummyFileStorage
java.lang.Object
ch.autumo.beetroot.server.modules.file.DummyFileStorage
- All Implemented Interfaces:
FileStorage
Dummy file storage - just an example of a simple file storage;
not to be used for serious and productive applications!
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
DummyFileStorage
public DummyFileStorage()
-
-
Method Details
-
store
Description copied from interface:FileStorageStore a file.- Specified by:
storein interfaceFileStorage- Parameters:
file- filename- file nameuser- user or nulldomain- domain or null (default)- Returns:
- unique file ID
- Throws:
Exception- exception
-
findFile
Description copied from interface:FileStorageFind a file (latest version). The file delivered within the download must be physically temporarily available, so it can be delivered by a stream and the file referenced by the download will ALWAYS be deleted after sending it to the client; so it is necessary to create a temporary file in the download - never reference the original file, e.g. when a real file structure is used as a file storage!- Specified by:
findFilein interfaceFileStorage- Parameters:
uniqueFileId- unique file iddomain- domain or null (default)- Returns:
- download or null if file is not available
- Throws:
Exception- exception
-
delete
Description copied from interface:FileStorageDelete a file.- Specified by:
deletein interfaceFileStorage- Parameters:
uniqueFileId- unique file iddomain- domain or null (default)- Returns:
- true if at least one (of all versions) has been found and deleted
- Throws:
Exception- exception
-