Interface IFileStoreServiceProvider

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    LocalDatabaseFileService

    public interface IFileStoreServiceProvider
    extends Serializable
    File Store Service Provider Interface. InputStream methods should be used for very large blobs
    • Method Detail

      • getName

        String getName()
        get the service name
        Returns:
        the service name
      • isDefault

        boolean isDefault()
        get the default
        Returns:
        true if default
      • storeFile

        String storeFile​(File file)
        Stores a file Lutece File
        Parameters:
        file - the file
        Returns:
        The key of the stored file
      • storeFileItem

        String storeFileItem​(org.apache.commons.fileupload.FileItem fileItem)
        Stores a org.apache.commons.fileupload.FileItem
        Parameters:
        fileItem - the fileItem
        Returns:
        The key of the blob
      • storeInputStream

        String storeInputStream​(InputStream inputStream)
        Stores an input stream
        Parameters:
        inputStream - the input stream
        Returns:
        The key of the blob
      • storeBytes

        String storeBytes​(byte[] blob)
        Store a blob from a bytes array
        Parameters:
        blob - The blob
        Returns:
        The key of the blob
      • getFile

        File getFile​(String strKey)
        Get a file
        Parameters:
        strKey - The key of the file
        Returns:
        The file
      • getFileMetaData

        File getFileMetaData​(String strKey)
        Get a file object only filled with the meta data (name, size ...) without the physical file content
        Parameters:
        strKey - The key of the file
        Returns:
        The file
      • delete

        void delete​(String strKey)
        Delete a blob
        Parameters:
        strKey - The key of the blob
      • getFileDownloadUrlFO

        String getFileDownloadUrlFO​(String strKey)
        Gets the file download url for Front Office Lutece users
        Parameters:
        strKey - the
        Returns:
        the download link
      • getFileDownloadUrlFO

        String getFileDownloadUrlFO​(String strKey,
                                    Map<String,​String> additionnalData)
        Gets the file download url for Front Office Lutece users
        Parameters:
        strKey - the
        additionnalData -
        Returns:
        the download link
      • getFileDownloadUrlBO

        String getFileDownloadUrlBO​(String strKey)
        Gets the file download url for Back Office admin Lutece users
        Parameters:
        strKey - the
        Returns:
        the download link
      • getFileDownloadUrlBO

        String getFileDownloadUrlBO​(String strKey,
                                    Map<String,​String> additionnalData)
        Gets the file download url for Back Office admin Lutece users
        Parameters:
        strKey - the
        additionnalData -
        Returns:
        the download link