Class FileUploadService
- java.lang.Object
-
- com.aquima.web.components.fileupload.service.FileUploadService
-
@Service public class FileUploadService extends Object
Service for uploading files with the AQ_File_Upload container- Author:
- N. van Noorloos
-
-
Constructor Summary
Constructors Constructor Description FileUploadService(IFileDefinitionTransform transform, IFileValidator validator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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)FileUploadConfiguration
retrieveConfiguration(PortalSessionWrap session, String configurationId)
Retrieve the configuration for the given configurationId from the sessionFileUploadStatus
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 containerFileUploadStatus
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
-
-
-
Constructor Detail
-
FileUploadService
public FileUploadService(IFileDefinitionTransform transform, IFileValidator validator)
-
-
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 sessionconfigurationId
- 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 sessionconfigurationId
- 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)
-
-