Interface FileStorage

All Known Implementing Classes:
DummyFileStorage

public interface FileStorage
File storage interface.
  • Method Details

    • store

      String store(File file, String name, String user, String domain) throws Exception
      Store a file.
      Parameters:
      file - file
      name - file name
      user - user or null
      domain - domain or null (default)
      Returns:
      unique file ID
      Throws:
      Exception - exception
    • findFile

      Download findFile(String uniqueFileId, String domain) throws Exception
      Find 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!
      Parameters:
      uniqueFileId - unique file id
      domain - domain or null (default)
      Returns:
      download or null if file is not available
      Throws:
      Exception - exception
    • delete

      boolean delete(String uniqueFileId, String domain) throws Exception
      Delete a file.
      Parameters:
      uniqueFileId - unique file id
      domain - domain or null (default)
      Returns:
      true if at least one (of all versions) has been found and deleted
      Throws:
      Exception - exception