Class GenericAttributeFileService


  • public class GenericAttributeFileService
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(java.lang.String strKey, java.lang.String strOrigin)
      Delete a file
      java.lang.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
      java.lang.String getFileStoreProviderName​(java.lang.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
      static GenericAttributeFileService getInstance()
      get instance of service
      fr.paris.lutece.portal.business.file.File load​(java.lang.String strKey, java.lang.String strOrigin)
      Load a file
      java.lang.String save​(fr.paris.lutece.portal.business.file.File file)
      Save a file
      java.lang.String save​(fr.paris.lutece.portal.business.file.File file, java.lang.String strEntryType)
      Save a file
      java.lang.String save​(org.apache.commons.fileupload.FileItem file, java.lang.String strEntryType)
      Save a file
      java.lang.String update​(fr.paris.lutece.portal.business.file.File file, java.lang.String strEntryType)
      Update a file
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getFileStoreProviderName

        public java.lang.String getFileStoreProviderName​(java.lang.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 java.lang.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
      • save

        public java.lang.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 java.lang.String save​(fr.paris.lutece.portal.business.file.File file,
                                     java.lang.String strEntryType)
        Save a file
        Parameters:
        file - The lutece file
        strEntryType - the entry type
        Returns:
        The key of the file
      • save

        public java.lang.String save​(org.apache.commons.fileupload.FileItem file,
                                     java.lang.String strEntryType)
        Save a file
        Parameters:
        file - The fileItem
        strEntryType - the entry type
        Returns:
        The key of the file
      • load

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

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

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