Class FormRecordMessageUploadRequest

    • Constructor Detail

      • FormRecordMessageUploadRequest

        public FormRecordMessageUploadRequest()
    • Method Detail

      • getAcceptedFileExtensions

        public String getAcceptedFileExtensions()
        A list of comma separated file extensions that are accepted for the upload. Can be null or empty, which means all file extensions are accepted.
        Returns:
        A list of comma separated file extensions that are accepted for the upload.
      • setAcceptedFileExtensions

        public void setAcceptedFileExtensions​(String acceptedFileExtensions)
        A list of comma separated file extensions that are accepted for the upload. Can be null or empty, which means all file extensions are accepted.
        Parameters:
        acceptedFileExtensions - A list of comma separated file extensions that are accepted for the upload.
      • setAttachments

        public void setAttachments​(List<Attachment> attachments)
      • setFileMergeMode

        public void setFileMergeMode​(EUploadRequestFileMergeMode fileMergeMode)
        When getFormFieldName() is set: how to handle existing files of the upload element.
        Parameters:
        fileMergeMode - How to handle existing files of the upload element.
      • getFormFieldName

        public String getFormFieldName()
        The name of the form field that this upload request is associated with. When set and a file is uploaded, the files are associated with that upload element. Can be null when the upload request is not associated with an upload form field. See also getFileMergeMode().
        Returns:
        The name of the form field that this upload request is associated with.
      • setFormFieldName

        public void setFormFieldName​(String formFieldName)
        The name of the form field that this upload request is associated with. When set and a file is uploaded, the files are associated with that upload element. Can be null when the upload request is not associated with an upload form field. See also getFileMergeMode().
        Parameters:
        formFieldName - The name of the form field that this upload request is associated with.
      • getId

        public Long getId()
        The database ID of this entity that uniquely identifies it in the system.
        Specified by:
        getId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
        Returns:
        The database ID of this entity.
      • getMaxNumberOfFiles

        public Long getMaxNumberOfFiles()
        The maximum number of files that can be uploaded. Can be null, which means no limit.
        Returns:
        The maximum number of files that can be uploaded.
      • setMaxNumberOfFiles

        public void setMaxNumberOfFiles​(Long maxNumberOfFiles)
        The maximum number of files that can be uploaded. Can be null, which means no limit.
        Parameters:
        maxNumberOfFiles - The maximum number of files that can be uploaded.
      • getMessage

        public FormRecordMessage getMessage()
        Each upload request is associated with a message that contains details for the end user regarding the upload, e.g. what is wrong with the existing file.
        Returns:
        The message owning this upload request.
      • setMessage

        public void setMessage​(FormRecordMessage message)
        Each upload request is associated with a message that contains details for the end user regarding the upload, e.g. what is wrong with the existing file.
        Parameters:
        message - The message owning this upload request.
      • getMinNumberOfFiles

        public long getMinNumberOfFiles()
        The minimum number of files that must be uploaded. Must be at least 1.
        Returns:
        The minimum number of files that must be uploaded.
      • setMinNumberOfFiles

        public void setMinNumberOfFiles​(long minNumberOfFiles)
        The minimum number of files that must be uploaded. Must be at least 1.
        Parameters:
        minNumberOfFiles - The minimum number of files that must be uploaded.
      • getName

        public String getName()
        The name of this upload request, possibly shown on the UI.
        Specified by:
        getName in interface INameProviding
        Returns:
        The name of this upload request.
      • setName

        public void setName​(String name)
        The name of this upload request, possibly shown on the UI.
        Parameters:
        name - The name of this upload request.
      • getRepetitionId

        public Long getRepetitionId()
        When the getFormFieldName() refers to a repeated field, the repetition index of the field. When set, only the files for that repetition instance are changed when a file is uploaded. Note that the repetition index is not the ordinal index of the repetition, but a unique identifier. An ordinal index starts at 0 is continuous. An ID may be any unique value.
        Returns:
        The repetition index of the field.
      • setRepetitionId

        public void setRepetitionId​(Long repetitionId)
        When the getFormFieldName() refers to a repeated field, the repetition index of the field. When set, only the files for that repetition instance are changed when a file is uploaded. Note that the repetition index is not the ordinal index of the repetition, but a unique identifier. An ordinal index starts at 0 is continuous. An ID may be any unique value.
        Parameters:
        repetitionId - The repetition index of the field.
      • getUUID

        public String getUUID()
        The UUID that identifies this upload request. The UUID is globally unique within the system.
        Specified by:
        getUUID in interface IUUIDEntity
        Returns:
        The UUID that identifies this upload request.
      • setUUID

        public void setUUID​(String uuid)
        The UUID that identifies this upload request. The UUID is globally unique within the system. message.
        Specified by:
        setUUID in interface IUUIDEntity
        Parameters:
        uuid - The UUID that identifies this upload request.
      • getUUIDObject

        public UUID getUUIDObject()
        The UUID that identifies this upload request. The UUID is globally unique within the system. message.
        Specified by:
        getUUIDObject in interface IUUIDEntity
        Returns:
        The UUID that identifies this upload request.
      • setUUIDObject

        public void setUUIDObject​(UUID uuid)
        The UUID that identifies this upload request. The UUID is globally unique within the system. message.
        Parameters:
        uuid - The UUID that identifies this upload request.
      • getUploadSizeLimit

        public Long getUploadSizeLimit()
        The maximum size of the uploaded file in bytes. Must be at least 1. Can be null, which means no limit.
        Returns:
        The maximum size of the uploaded file in bytes.
      • setUploadSizeLimit

        public void setUploadSizeLimit​(Long uploadSizeLimit)
        The maximum size of the uploaded file in bytes. Must be at least 1. Can be null, which means no limit.
        Parameters:
        uploadSizeLimit - The maximum size of the uploaded file in bytes.
      • getUploadedInstant

        public Instant getUploadedInstant()
        The timestamp when the upload was fulfilled. null if the request is still pending and files were uploaded yet.
        Returns:
        The timestamp when the upload was fulfilled.
      • setUploadedInstant

        public void setUploadedInstant​(Instant uploadedInstant)
        The timestamp when the upload was fulfilled. null if the request is still pending and files were uploaded yet.
        Parameters:
        uploadedInstant - The timestamp when the upload was fulfilled.
      • getUploaderAuthRef

        @Nullable
        public String getUploaderAuthRef()
        The universal reference ID to the user that uploaded the files. Is null if the upload is not yet fulfilled.
        Returns:
        The universal reference ID of the uploader.
      • setUploaderAuthRef

        public void setUploaderAuthRef​(String uploaderAuthRef)
        Sets the universal reference ID to the user that uploaded the files.
        Parameters:
        uploaderAuthRef - The universal reference ID of the uploader.
      • getUploaderUserProfileUuid

        @Nullable
        public UUID getUploaderUserProfileUuid()
        The UUID of the user profile of the uploader. May be null if the user did not have a user profile. There might not exist a user profile anymore for this UUID.
        Returns:
        The UUID of the uploader's user profile.
      • setUploaderUserProfileUuid

        public void setUploaderUserProfileUuid​(UUID uploaderUserProfileUuid)
      • isFulfilled

        public boolean isFulfilled()
      • isPending

        public boolean isPending()
      • removeAttachment

        public void removeAttachment​(Attachment attachment)
        Removes the given attachment from the list of attachments, if such an attachment exists.
        Parameters:
        attachment - The attachment to remove.