Interface UploadFragmentScope

  • All Superinterfaces:
    FragmentScope

    public interface UploadFragmentScope
    extends FragmentScope
    Scope for a BasicFormUploadFragment. Is meant to store information about an uploaded file in the form session.
    • Method Detail

      • getOriginalFilename

        @Deprecated
        String getOriginalFilename()
        Deprecated.
        This method is deprecated since 10.33.0. The UploadFragmentScope now supports multiple uploaded files. Hence use FragmentScope.getValues() instead, to retrieve a List of UploadedFile instances. Invoke UploadedFile.getOriginalFilename() on these instances instead.
        Returns the original filename of the uploaded file.
        Returns:
        original filename of the uploaded file or null if there is none
      • setOriginalFilename

        @Deprecated
        void setOriginalFilename​(String filename)
        Deprecated.
        This method is deprecated since 10.33.0. The UploadFragmentScope now supports multiple uploaded files. Hence use addFile(nl.gx.forms.wmpformapi.engine.UploadedFile) instead to add an uploaded file.
        Sets the original filename of the uploaded file.
        Parameters:
        filename - the original filename of the uploaded file
      • setCurrentFilename

        @Deprecated
        void setCurrentFilename​(String filename)
        Deprecated.
        This method is deprecated since 10.33.0. The UploadFragmentScope now supports multiple uploaded files. Hence use addFile(nl.gx.forms.wmpformapi.engine.UploadedFile) instead to add an uploaded file.
        Sets the name of the file stored on disk.
        Parameters:
        filename - the name of the file stored on disk
      • getSize

        @Deprecated
        long getSize()
        Deprecated.
        This method is deprecated since 10.33.0. The UploadFragmentScope now supports multiple uploaded files. Hence use FragmentScope.getValues() instead, to retrieve a List of UploadedFile instances. Invoke UploadedFile.getSize() on these instances instead.
        Returns the size of the uploaded file.
        Returns:
        the size of the uploaded file
      • setSize

        @Deprecated
        void setSize​(long size)
        Deprecated.
        This method is deprecated since 10.33.0. The UploadFragmentScope now supports multiple uploaded files. Hence use addFile(nl.gx.forms.wmpformapi.engine.UploadedFile) instead to add an uploaded file.
        Sets the size of the uploaded file.
        Parameters:
        size - the size of the uploaded file
      • setContentType

        @Deprecated
        void setContentType​(String contentType)
        Deprecated.
        This method is deprecated since 10.33.0. The UploadFragmentScope now supports multiple uploaded files. Hence use addFile(nl.gx.forms.wmpformapi.engine.UploadedFile) instead to add an uploaded file.
        Sets the content type of the uploaded file.
        Parameters:
        contentType - the content type of the uploaded file
      • clearFile

        @Deprecated
        void clearFile()
        Deprecated.
        This method is deprecated since 10.33.0. The UploadFragmentScope now supports multiple uploaded files. Hence invoke clearFiles() instead.
        Clears the filename, file size and content type values in the scope and deletes the corresponding file from disk.
        Since:
        10.31.0
      • clearFiles

        void clearFiles()
        Clears all previously uploaded files from the form scope and removes the files from the local form scope work directory. Invokes when files for the same fragment within the scope are uploaded a second time. This may happen in a multi step form where the user goes back to the step containing the form upload fragment and then resubmits that step.
        Since:
        10.33.0
      • addFile

        void addFile​(UploadedFile file)
        Adds an uploaded file to the upload fragment scope. If null is provided or the physical file associated with the UploadedFile does not exist, this method does nothing.
        Parameters:
        file - The uploaded file to append to the scope
        Since:
        10.33.0