Class GenericAttributeFileService
java.lang.Object
fr.paris.lutece.plugins.genericattributes.service.file.GenericAttributeFileService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDelete a fileget FileStoreServiceProvider name : - returns the GenAttr default FileService (if set) - otherwise, returns the lutece default FileService Use getFileStoreProviderName( String strEntryType ) to get entryType specific File servicegetFileStoreProviderName(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 GenericAttributeFileServiceDeprecated, for removal: This API element is subject to removal in a future version.voidinit()Initializes the service.fr.paris.lutece.portal.business.file.FileLoad a filesave(fr.paris.lutece.portal.business.file.File file) Save a fileSave a fileSave a fileUpdate a file
-
Constructor Details
-
GenericAttributeFileService
public GenericAttributeFileService()
-
-
Method Details
-
init
@PostConstruct public void init()Initializes the service. -
getFileStoreProviderName
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
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
Deprecated, for removal: This API element is subject to removal in a future version.since 3.0, use@Inject GenericAttributeFileServiceinsteadReturns the CDI-managed instance of this service.- Returns:
- the instance
-
save
Save a file- Parameters:
file- The lutece file in default generic file Service- Returns:
- The key of the file
-
save
Save a file- Parameters:
file- The lutece filestrEntryType- the entry type- Returns:
- The key of the file
-
save
Save a file- Parameters:
file- The multipartItemstrEntryType- the entry type- Returns:
- The key of the file
-
load
Load a file- Parameters:
strKey- The key of the file- Returns:
- The file
-
delete
Delete a file- Parameters:
strKey- The key of the file
-
update
Update a file- Parameters:
file- The lutece filestrEntryType- the entry type- Returns:
- The key of the file
-
@Inject GenericAttributeFileServiceinstead