Class FileImageService
java.lang.Object
fr.paris.lutece.portal.service.fileimage.FileImageService
- All Implemented Interfaces:
ImageResourceProvider
Service for AdminUser image attributes. Provide ImageResource management
-
Method Summary
Modifier and TypeMethodDescriptionaddImageResource(fr.paris.lutece.portal.service.upload.MultipartItem fileItem) Add Image ResourcegetImageResource(int nIdResource) Return the Resource idstatic FileImageServiceDeprecated, for removal: This API element is subject to removal in a future version.Return the Resource Type idstatic voidinit()Initvoidregister()Initializes the service
-
Method Details
-
init
public static void init()Init- Throws:
LuteceInitException- if an error occurs
-
register
public void register()Initializes the service -
getInstance
Deprecated, for removal: This API element is subject to removal in a future version.Use@Injectto obtain theFileImageServiceinstance. This method will be removed in future versions.Returns the unique instance of theFileImageServiceservice.This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with
@Injectto obtain theFileImageServiceinstance instead.- Returns:
- The unique instance of
FileImageService.
-
getImageResource
Return the Resource id- Specified by:
getImageResourcein interfaceImageResourceProvider- Parameters:
nIdResource- The resource identifier- Returns:
- The Resource Image
-
getResourceTypeId
Return the Resource Type id- Specified by:
getResourceTypeIdin interfaceImageResourceProvider- Returns:
- The Resource Type Id
-
addImageResource
Add Image Resource- Specified by:
addImageResourcein interfaceImageResourceProvider- Parameters:
fileItem-- Returns:
- the Image File Key
-
@Injectto obtain theFileImageServiceinstance.