Class GenericAttributeFileService

java.lang.Object
fr.paris.lutece.plugins.genericattributes.service.file.GenericAttributeFileService

@ApplicationScoped public class GenericAttributeFileService extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(String strKey, String strOrigin)
    Delete a file
    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
    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
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 3.0, use @Inject GenericAttributeFileService instead
    void
    Initializes the service.
    fr.paris.lutece.portal.business.file.File
    load(String strKey, String strOrigin)
    Load a file
    save(fr.paris.lutece.portal.business.file.File file)
    Save a file
    save(fr.paris.lutece.portal.business.file.File file, String strEntryType)
    Save a file
    save(fr.paris.lutece.portal.service.upload.MultipartItem file, String strEntryType)
    Save a file
    update(fr.paris.lutece.portal.business.file.File file, String strEntryType)
    Update a file

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GenericAttributeFileService

      public GenericAttributeFileService()
  • Method Details

    • init

      @PostConstruct public void init()
      Initializes the service.
    • getFileStoreProviderName

      public String getFileStoreProviderName(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 FileService
      Parameters:
      strEntryType -
      Returns:
      the name of the FileStoreServiceProvider
    • getFileStoreProviderName

      public String 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(since="3.0", forRemoval=true) public static GenericAttributeFileService getInstance()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 3.0, use @Inject GenericAttributeFileService instead
      Returns the CDI-managed instance of this service.
      Returns:
      the instance
    • save

      public String save(fr.paris.lutece.portal.business.file.File file)
      Save a file
      Parameters:
      file - The lutece file in default generic file Service
      Returns:
      The key of the file
    • save

      public String save(fr.paris.lutece.portal.business.file.File file, String strEntryType)
      Save a file
      Parameters:
      file - The lutece file
      strEntryType - the entry type
      Returns:
      The key of the file
    • save

      public String save(fr.paris.lutece.portal.service.upload.MultipartItem file, String strEntryType)
      Save a file
      Parameters:
      file - The multipartItem
      strEntryType - the entry type
      Returns:
      The key of the file
    • load

      public fr.paris.lutece.portal.business.file.File load(String strKey, String strOrigin)
      Load a file
      Parameters:
      strKey - The key of the file
      Returns:
      The file
    • delete

      public void delete(String strKey, String strOrigin)
      Delete a file
      Parameters:
      strKey - The key of the file
    • update

      public String update(fr.paris.lutece.portal.business.file.File file, String strEntryType)
      Update a file
      Parameters:
      file - The lutece file
      strEntryType - the entry type
      Returns:
      The key of the file