Class NewsletterFileService
java.lang.Object
fr.paris.lutece.plugins.newsletter.service.NewsletterFileService
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 Summary
Modifier and TypeMethodDescriptionstatic voiddeleteFile(String strFileName) Deletes a file by key if it exists in the store.static voiddeleteFiles(List<String> listFiles) Deletes a list of files by key if they exist in the store.static fr.paris.lutece.portal.business.file.FilegetFileByKey(String strFileName) Retrieves a file by its key.static StringReturns the configured file store provider name.static StringstoreFile(fr.paris.lutece.portal.business.file.File luteceFile) Stores a Lutece file in the configured file store.static StringstoreFileItem(fr.paris.lutece.portal.service.upload.MultipartItem luteceFile) Stores a multipart upload item in the configured file store.
-
Method Details
-
getFileByKey
Retrieves a file by its key.- Parameters:
strFileName- The file key- Returns:
- The stored file, or
nullif not found or on error
-
getFileStoreProvideName
Returns the configured file store provider name.- Returns:
- The provider bean name from the plugin configuration
-
deleteFile
Deletes a file by key if it exists in the store.- Parameters:
strFileName- The file key to delete
-
deleteFiles
Deletes a list of files by key if they exist in the store.- Parameters:
listFiles- The file keys to delete
-
storeFileItem
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
nullon error
-
storeFile
Stores a Lutece file in the configured file store.- Parameters:
luteceFile- The file to store- Returns:
- The key of the stored file, or
nullon error
-