Class GenericAttributeFileService
- java.lang.Object
-
- fr.paris.lutece.plugins.genericattributes.service.file.GenericAttributeFileService
-
public class GenericAttributeFileService extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(String strKey, String strOrigin)Delete a fileStringgetFileStoreProviderName()get FileStoreServiceProvider name : - returns the GenAttr default FileService (if set) - otherwise, returns the lutece default FileService Use getFileStoreProviderName( String strEntryType ) to get entryType specific File serviceStringgetFileStoreProviderName(String strEntryType)get FileStoreServiceProvider name for entry type : - returns the entry type FileService (if set) - otherwise, returns the GenAttr default FileService (if set) - otherwise, returns the lutece default FileServicestatic GenericAttributeFileServicegetInstance()get instance of servicefr.paris.lutece.portal.business.file.Fileload(String strKey, String strOrigin)Load a fileStringsave(fr.paris.lutece.portal.business.file.File file)Save a fileStringsave(fr.paris.lutece.portal.business.file.File file, String strEntryType)Save a fileStringsave(org.apache.commons.fileupload.FileItem file, String strEntryType)Save a fileStringupdate(fr.paris.lutece.portal.business.file.File file, String strEntryType)Update a file
-
-
-
Method Detail
-
getFileStoreProviderName
public String getFileStoreProviderName(String strEntryType)
get FileStoreServiceProvider name for entry type : - returns the entry type FileService (if set) - otherwise, returns the GenAttr default FileService (if set) - otherwise, returns the lutece default FileService- Parameters:
strEntryType-- Returns:
- the name of the FileStoreServiceProvider
-
getFileStoreProviderName
public String getFileStoreProviderName()
get FileStoreServiceProvider name : - returns the GenAttr default FileService (if set) - otherwise, returns the lutece default FileService Use getFileStoreProviderName( String strEntryType ) to get entryType specific File service- Returns:
- the name of the FileStoreServiceProvider
-
getInstance
public static GenericAttributeFileService getInstance()
get instance of service- Returns:
- the instance
-
save
public String save(fr.paris.lutece.portal.business.file.File file)
Save a file- Parameters:
file- The lutece file in default generic file Service- Returns:
- The key of the file
-
save
public String save(fr.paris.lutece.portal.business.file.File file, String strEntryType)
Save a file- Parameters:
file- The lutece filestrEntryType- the entry type- Returns:
- The key of the file
-
save
public String save(org.apache.commons.fileupload.FileItem file, String strEntryType)
Save a file- Parameters:
file- The fileItemstrEntryType- the entry type- Returns:
- The key of the file
-
load
public fr.paris.lutece.portal.business.file.File load(String strKey, String strOrigin)
Load a file- Parameters:
strKey- The key of the file- Returns:
- The file
-
delete
public void delete(String strKey, String strOrigin)
Delete a file- Parameters:
strKey- The key of the file
-
-