Package nl.gx.forms.wmpformapi.engine
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 Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addFile(UploadedFile file)
Adds an uploaded file to the upload fragment scope.void
clearFile()
Deprecated.This method is deprecated since 10.33.0.void
clearFiles()
Clears all previously uploaded files from the form scope and removes the files from the local form scope work directory.String
getContentType()
Deprecated.This method is deprecated since 10.33.0.String
getCurrentFilename()
Deprecated.This method is deprecated since 10.33.0.String
getOriginalFilename()
Deprecated.This method is deprecated since 10.33.0.long
getSize()
Deprecated.This method is deprecated since 10.33.0.void
setContentType(String contentType)
Deprecated.This method is deprecated since 10.33.0.void
setCurrentFilename(String filename)
Deprecated.This method is deprecated since 10.33.0.void
setOriginalFilename(String filename)
Deprecated.This method is deprecated since 10.33.0.void
setSize(long size)
Deprecated.This method is deprecated since 10.33.0.-
Methods inherited from interface nl.gx.forms.wmpformapi.engine.FragmentScope
addError, addMessage, addValue, clearErrors, clearMessages, clearValues, getCondition, getErrors, getMessages, getPrefilling, getValue, getValueIsSubmitted, getValues, hasErrors, setCondition, setPrefilling, setValue, setValueIsSubmitted, setValues
-
-
-
-
Method Detail
-
getOriginalFilename
@Deprecated String getOriginalFilename()
Deprecated.This method is deprecated since 10.33.0. The UploadFragmentScope now supports multiple uploaded files. Hence useFragmentScope.getValues()
instead, to retrieve aList
ofUploadedFile
instances. InvokeUploadedFile.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 useaddFile(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
-
getCurrentFilename
@Deprecated String getCurrentFilename()
Deprecated.This method is deprecated since 10.33.0. The UploadFragmentScope now supports multiple uploaded files. Hence useFragmentScope.getValues()
instead, to retrieve aList
ofUploadedFile
instances. InvokeUploadedFile.getFile()
to retrieve the File and invokeFile.getAbsolutePath()
on it to retrieve the current filename instead.Returns the name of the file stored on disk.- Returns:
- the name of the file stored on disk
-
setCurrentFilename
@Deprecated void setCurrentFilename(String filename)
Deprecated.This method is deprecated since 10.33.0. The UploadFragmentScope now supports multiple uploaded files. Hence useaddFile(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 useFragmentScope.getValues()
instead, to retrieve aList
ofUploadedFile
instances. InvokeUploadedFile.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 useaddFile(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
-
getContentType
@Deprecated String getContentType()
Deprecated.This method is deprecated since 10.33.0. The UploadFragmentScope now supports multiple uploaded files. Hence useFragmentScope.getValues()
instead, to retrieve aList
ofUploadedFile
instances. InvokeUploadedFile.getContentType()
on these instances instead.Returns the content type of the uploaded file.- Returns:
- the content type 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 useaddFile(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 invokeclearFiles()
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
-
-