Class NewsletterFileService

java.lang.Object
fr.paris.lutece.plugins.newsletter.service.NewsletterFileService

public class NewsletterFileService extends Object
Static facade over the newsletter file store provider. Static methods are kept for backward compatibility with existing callers; the underlying provider is resolved once through CDI and cached.
  • Method Details

    • getFileByKey

      public static fr.paris.lutece.portal.business.file.File getFileByKey(String strFileName)
      Retrieves a file by its key.
      Parameters:
      strFileName - The file key
      Returns:
      The stored file, or null if not found or on error
    • getFileStoreProvideName

      public static String getFileStoreProvideName()
      Returns the configured file store provider name.
      Returns:
      The provider bean name from the plugin configuration
    • deleteFile

      public static void deleteFile(String strFileName)
      Deletes a file by key if it exists in the store.
      Parameters:
      strFileName - The file key to delete
    • deleteFiles

      public static void deleteFiles(List<String> listFiles)
      Deletes a list of files by key if they exist in the store.
      Parameters:
      listFiles - The file keys to delete
    • storeFileItem

      public static String storeFileItem(fr.paris.lutece.portal.service.upload.MultipartItem luteceFile)
      Stores a multipart upload item in the configured file store.
      Parameters:
      luteceFile - The multipart item to store
      Returns:
      The key of the stored file, or null on error
    • storeFile

      public static String storeFile(fr.paris.lutece.portal.business.file.File luteceFile)
      Stores a Lutece file in the configured file store.
      Parameters:
      luteceFile - The file to store
      Returns:
      The key of the stored file, or null on error