Package org.openxava.web.editors
Interface IFilePersistor
- All Known Implementing Classes:
FileSystemPersistor,JPAFilePersistor
public interface IFilePersistor
Interface used to interact with a file container (database, file system, etc)
- Author:
- Jeromy Altuna
-
Method Summary
Modifier and TypeMethodDescriptionFind AttachedFile by primary key.findLibrary(String libraryId) Find files belonging to a library.voidRemove the file from the storage container.voidremoveLibrary(String libraryId) Removes files belonging to a library.voidsave(AttachedFile file) Persist a File (stored somewhere).
-
Method Details
-
save
Persist a File (stored somewhere).This method should generate a unique identifier for the file.
- Parameters:
file- Object of classAttachedFileto be persisted
-
remove
Remove the file from the storage container.- Parameters:
id- unique identifier of the file
-
removeLibrary
Removes files belonging to a library.- Parameters:
libraryId- Unique identifier of the files library
-
find
Find AttachedFile by primary key.- Parameters:
id- unique identifier of the file- Returns:
- An instance of the file found or null if the file does not exist
-
findLibrary
Find files belonging to a library.- Parameters:
libraryId- Unique identifier of the files library- Returns:
- Collection of objects of the class
AttachedFile
-