Class FileImageService

java.lang.Object
fr.paris.lutece.portal.service.fileimage.FileImageService
All Implemented Interfaces:
ImageResourceProvider

@ApplicationScoped public class FileImageService extends Object implements ImageResourceProvider
Service for AdminUser image attributes. Provide ImageResource management
  • Method Details

    • init

      public static void init()
      Init
      Throws:
      LuteceInitException - if an error occurs
    • register

      public void register()
      Initializes the service
    • getInstance

      @Deprecated(since="8.0", forRemoval=true) public static FileImageService getInstance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Use @Inject to obtain the FileImageService instance. This method will be removed in future versions.
      Returns the unique instance of the FileImageService service.

      This method is deprecated and is provided for backward compatibility only. For new code, use dependency injection with @Inject to obtain the FileImageService instance instead.

      Returns:
      The unique instance of FileImageService.
    • getImageResource

      public ImageResource getImageResource(int nIdResource)
      Return the Resource id
      Specified by:
      getImageResource in interface ImageResourceProvider
      Parameters:
      nIdResource - The resource identifier
      Returns:
      The Resource Image
    • getResourceTypeId

      public String getResourceTypeId()
      Return the Resource Type id
      Specified by:
      getResourceTypeId in interface ImageResourceProvider
      Returns:
      The Resource Type Id
    • addImageResource

      public String addImageResource(fr.paris.lutece.portal.service.upload.MultipartItem fileItem)
      Add Image Resource
      Specified by:
      addImageResource in interface ImageResourceProvider
      Parameters:
      fileItem -
      Returns:
      the Image File Key