org.loom.persistence.file
Interface FileManager

All Known Implementing Classes:
DatabaseFileManager, ExternalFileManager

public interface FileManager

Handle persistent files


Method Summary
 PersistentFile find(java.lang.Integer id)
           
 PersistentFile merge(FileParameter fileParameter)
          Stores a file in the database and return the persistent instance
 PersistentFile merge(PersistentFile file)
          Stores a file in the database and return the persistent instance
 PersistentFile remove(java.lang.Integer id)
          Removes a persistent file from the database
 

Method Detail

merge

PersistentFile merge(FileParameter fileParameter)
Stores a file in the database and return the persistent instance

Parameters:
fileParameter - the uploaded parameter file
Returns:
the persisted instance

merge

PersistentFile merge(PersistentFile file)
Stores a file in the database and return the persistent instance

Parameters:
file - the modified file to store
Returns:
the persisted instance

find

PersistentFile find(java.lang.Integer id)
Parameters:
id - the persistent file id
Returns:
the persistent file entity
Throws:
EntityNotFoundException - if there is no persistent file with the provided id.

remove

PersistentFile remove(java.lang.Integer id)
Removes a persistent file from the database

Parameters:
id - the file id to remove
Returns:
the removed file entity
Throws:
EntityNotFoundException - if there is no persistent file with the provided id.