Package org.openxava.web.editors
Class FileSystemPersistor
- java.lang.Object
-
- org.openxava.web.editors.FileSystemPersistor
-
- All Implemented Interfaces:
IFilePersistor
public class FileSystemPersistor extends java.lang.Object implements IFilePersistor
A implementation ofIFilePersistor- Author:
- Jeromy Altuna
-
-
Constructor Summary
Constructors Constructor Description FileSystemPersistor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttachedFilefind(java.lang.String id)Find AttachedFile by primary key.java.util.Collection<AttachedFile>findLibrary(java.lang.String libraryId)Find files belonging to a library.voidremove(java.lang.String id)Remove the file from the storage container.voidremoveLibrary(java.lang.String libraryId)Removes files belonging to a library.voidsave(AttachedFile file)Persist a File (stored somewhere).
-
-
-
Method Detail
-
save
public void save(AttachedFile file)
Description copied from interface:IFilePersistorPersist a File (stored somewhere).This method should generate a unique identifier for the file.
- Specified by:
savein interfaceIFilePersistor- Parameters:
file- Object of classAttachedFileto be persisted- See Also:
IFilePersistor.save(AttachedFile)
-
remove
public void remove(java.lang.String id)
Description copied from interface:IFilePersistorRemove the file from the storage container.- Specified by:
removein interfaceIFilePersistor- Parameters:
id- unique identifier of the file- See Also:
IFilePersistor.remove(String)
-
removeLibrary
public void removeLibrary(java.lang.String libraryId)
Description copied from interface:IFilePersistorRemoves files belonging to a library.- Specified by:
removeLibraryin interfaceIFilePersistor- Parameters:
libraryId- Unique identifier of the files library- See Also:
IFilePersistor.removeLibrary(String)
-
find
public AttachedFile find(java.lang.String id)
Description copied from interface:IFilePersistorFind AttachedFile by primary key.- Specified by:
findin interfaceIFilePersistor- Parameters:
id- unique identifier of the file- Returns:
- An instance of the file found or null if the file does not exist
- See Also:
IFilePersistor.find(String)
-
findLibrary
public java.util.Collection<AttachedFile> findLibrary(java.lang.String libraryId)
Description copied from interface:IFilePersistorFind files belonging to a library.- Specified by:
findLibraryin interfaceIFilePersistor- Parameters:
libraryId- Unique identifier of the files library- Returns:
- Collection of objects of the class
AttachedFile - See Also:
IFilePersistor.findLibrary(String)
-
-