Class GenericAttributeFileService
- java.lang.Object
-
- fr.paris.lutece.plugins.genericattributes.service.file.GenericAttributeFileService
-
public class GenericAttributeFileService extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(java.lang.String strKey, java.lang.String strOrigin)Delete a filejava.lang.StringgetFileStoreProviderName()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 servicejava.lang.StringgetFileStoreProviderName(java.lang.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(java.lang.String strKey, java.lang.String strOrigin)Load a filejava.lang.Stringsave(fr.paris.lutece.portal.business.file.File file)Save a filejava.lang.Stringsave(fr.paris.lutece.portal.business.file.File file, java.lang.String strEntryType)Save a filejava.lang.Stringsave(org.apache.commons.fileupload.FileItem file, java.lang.String strEntryType)Save a filejava.lang.Stringupdate(fr.paris.lutece.portal.business.file.File file, java.lang.String strEntryType)Update a file
-
-
-
Method Detail
-
getFileStoreProviderName
public java.lang.String getFileStoreProviderName(java.lang.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 java.lang.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 java.lang.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 java.lang.String save(fr.paris.lutece.portal.business.file.File file, java.lang.String strEntryType)Save a file- Parameters:
file- The lutece filestrEntryType- the entry type- Returns:
- The key of the file
-
save
public java.lang.String save(org.apache.commons.fileupload.FileItem file, java.lang.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(java.lang.String strKey, java.lang.String strOrigin)Load a file- Parameters:
strKey- The key of the file- Returns:
- The file
-
delete
public void delete(java.lang.String strKey, java.lang.String strOrigin)Delete a file- Parameters:
strKey- The key of the file
-
update
public java.lang.String update(fr.paris.lutece.portal.business.file.File file, java.lang.String strEntryType)Update a file- Parameters:
file- The lutece filestrEntryType- the entry type- Returns:
- The key of the file
-
-