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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttachedFile
find(java.lang.String id)
Find AttachedFile by primary key.java.util.Collection<AttachedFile>
findLibrary(java.lang.String libraryId)
Find files belonging to a library.void
remove(java.lang.String id)
Remove the file from the storage container.void
removeLibrary(java.lang.String libraryId)
Removes files belonging to a library.void
save(AttachedFile file)
Persist a File (stored somewhere).
-
-
-
Method Detail
-
save
void save(AttachedFile file)
Persist a File (stored somewhere).This method should generate a unique identifier for the file.
- Parameters:
file
- Object of classAttachedFile
to be persisted
-
remove
void remove(java.lang.String id)
Remove the file from the storage container.- Parameters:
id
- unique identifier of the file
-
removeLibrary
void removeLibrary(java.lang.String libraryId)
Removes files belonging to a library.- Parameters:
libraryId
- Unique identifier of the files library
-
find
AttachedFile find(java.lang.String id)
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
java.util.Collection<AttachedFile> findLibrary(java.lang.String libraryId)
Find files belonging to a library.- Parameters:
libraryId
- Unique identifier of the files library- Returns:
- Collection of objects of the class
AttachedFile
-
-