Class GenericAttributeFileService

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

public class GenericAttributeFileService extends Object
  • 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
    get instance of 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
  • Method Details

    • 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

      public static GenericAttributeFileService getInstance()
      get instance of 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