Class FileUploadService


  • @Service
    public class FileUploadService
    extends Object
    Service for uploading files with the AQ_File_Upload container
    Author:
    N. van Noorloos
    • Method Detail

      • upload

        public FileUploadStatus upload​(PortalSessionWrap session,
                                       String configurationId,
                                       List<IFileDefinition> files,
                                       List<com.aquima.interactions.foundation.types.EntityValue> activeInstancesForUploadContainer,
                                       com.aquima.interactions.composer.IRuntimeKeyPrinter printer)
        Method to handle (multiple) files for uploading
        Parameters:
        session - Wrapped portal session
        configurationId - The id of the configuration that is stored on the page scope.
        files - The definitions of the files to be uploaded
        Returns:
        Runtime key of the button from the file upload container that's responsible for throwing an event, null when upload failed.
      • retrieveConfiguration

        public FileUploadConfiguration retrieveConfiguration​(PortalSessionWrap session,
                                                             String configurationId)
        Retrieve the configuration for the given configurationId from the session
        Parameters:
        session - Wrapped portal session
        configurationId - The id of the configuration that is stored on the page scope.
        Returns:
        the configuration
      • setEventButtonKeys

        public FileUploadStatus setEventButtonKeys​(FileUploadStatus uploadStatus,
                                                   com.aquima.interactions.composer.IElement[] elements,
                                                   String containerName,
                                                   List<com.aquima.interactions.foundation.types.EntityValue> activeInstancesForUploadContainer,
                                                   com.aquima.interactions.composer.IRuntimeKeyPrinter printer)
        Set the correct events for the buttons based on the (new) file upload container
      • getActiveInstancesForUploadContainer

        public List<com.aquima.interactions.foundation.types.EntityValue> getActiveInstancesForUploadContainer​(com.aquima.interactions.composer.IElement[] elements,
                                                                                                               String configurationId,
                                                                                                               String containerName,
                                                                                                               List<com.aquima.interactions.foundation.types.EntityValue> activeInstances)
        Retrieve the active instances for the upload container (by name and configurationId)