Package com.ebasetech.xi.api.controls
Interface FileUploadControl
- All Superinterfaces:
BackgroundStyleProperties
,BootstrapButtonStyle
,BorderStyleProperties
,ButtonControl
,ButtonControlProperties
,Control
,Element
,EventOwner
,MarginStyleProperties
,MessageContainer
,MessageProperties
,PaddingStyleProperties
,java.io.Serializable
,TextStyleProperties
,WebFormEventOwner
public interface FileUploadControl extends ButtonControl
The FileUploadControl control provides functionality to select local files and upload them.
Files can either be uploaded immediately or using the
InitiateUploadControl
.
-
Method Summary
Modifier and Type Method Description java.util.ArrayList<com.ebasetech.ufs.runtime.controls.fileupload.FileUploadTextControl>
getAssociatedFileUploadTextControls()
Returns an ArrayList of all FileUploadText controls linked to this.FileItemIterator
getFileItems()
Returns an iterator through FileItems representing the uploaded files.java.lang.String
getFileTypes()
Returns a comma separated string of permitted file and MIME types.java.lang.String
getMaximumFileSize()
Returns the maximum file size.java.lang.String
getTargetDirectory()
Returns the target directory as a relative or absolute path.boolean
isImmediateUpload()
Returns true if selected files are immediately uploaded, otherwise returns false.boolean
isMultipleFilesSupported()
Returns true if multiple files can be uploaded at once, otherwise returns false.boolean
isReplaceDuplicateFiles()
Returns true if files with duplicate names will be replaced, otherwise returns false.void
setFileTypes(java.lang.String fileTypes)
Sets a comma separated string of permitted file and MIME types.void
setImmediateUpload(boolean immediateUpload)
If set to true, selected files are immediately uploaded.void
setMaximumFileSize(java.lang.String maximumFileSize)
Sets the maximum file size.void
setMultipleFilesSupported(boolean multipleFilesSupported)
If set to true, multiple files can be selected at once.void
setReplaceDuplicateFiles(boolean replaceDuplicateFiles)
If set to true, files with duplicate names will be replaced.void
setTargetDirectory(java.lang.String targetDirectory)
Sets the target directory as a relative or absolute path.Methods inherited from interface com.ebasetech.xi.api.controls.BackgroundStyleProperties
getBackgroundColor, getBackgroundImage, getBackgroundImagePosition, getBackgroundImageRepeat, setBackgroundColor, setBackgroundImage, setBackgroundImagePosition, setBackgroundImageRepeat
Methods inherited from interface com.ebasetech.xi.api.controls.BootstrapButtonStyle
getBootstrapSize, getBootstrapState, getBootstrapStyle, setBootstrapSize, setBootstrapState, setBootstrapStyle
Methods inherited from interface com.ebasetech.xi.api.controls.BorderStyleProperties
getBorderColor, getBorderRadius, getBorderStyle, getBorderWidth, getBottomBorderWidth, getLeftBorderWidth, getRightBorderWidth, getTopBorderWidth, setBorderColor, setBorderRadius, setBorderStyle, setBorderWidth, setBottomBorderWidth, setLeftBorderWidth, setRightBorderWidth, setTopBorderWidth
Methods inherited from interface com.ebasetech.xi.api.controls.ButtonControlProperties
getButtonText, getMouseOverText, isDisabled, isSkipValidation, setDisabled, setSkipValidation
Methods inherited from interface com.ebasetech.xi.api.controls.Control
addCssClass, getAll, getCssClass, getErrorMsgClass, getErrorMsgStyle, getInfoMsgClass, getInfoMsgStyle, getLayoutCell, getNextSiblingControl, getPage, getParentControl, getPreviousSiblingControl, getRootHtmlElementProperties, getStyle, getWarningMsgClass, getWarningMsgStyle, hasModifier, hide, isContainer, isDisplayOnly, isDisplayOnlyIncludingParents, isEventField, isHidden, isInheritMsg, isLocalMsg, isNewLine, isShowing, refresh, removeCssClass, requestFocus, setCssClass, setDisplayOnly, setErrorMsgClass, setErrorMsgStyle, setHidden, setInfoMsgClass, setInfoMsgStyle, setNewLine, setStyle, setWarningMsgClass, setWarningMsgStyle, show
Methods inherited from interface com.ebasetech.xi.api.Element
getElementName, getElementType
Methods inherited from interface com.ebasetech.xi.api.controls.MarginStyleProperties
getAllMargin, getBottomMargin, getLeftMargin, getRightMargin, getTopMargin, setAllMargin, setBottomMargin, setLeftMargin, setRightMargin, setTopMargin
Methods inherited from interface com.ebasetech.xi.api.MessageContainer
addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessageText, addErrorMessageText, addErrorMessageText, addInfoMessage, addInfoMessage, addInfoMessageText, addInfoMessageText, addInfoMessageText, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessageText, addWarningMessageText, addWarningMessageText, existErrorMessages, existInfoMessages, existMessages, existWarningMessages
Methods inherited from interface com.ebasetech.xi.api.controls.MessageProperties
getErrorMessageStyle, getInfoMessageStyle, getWarningMessageStyle
Methods inherited from interface com.ebasetech.xi.api.controls.PaddingStyleProperties
getAllPadding, getBottomPadding, getLeftPadding, getRightPadding, getTopPadding, setAllPadding, setBottomPadding, setLeftPadding, setRightPadding, setTopPadding
Methods inherited from interface com.ebasetech.xi.api.controls.TextStyleProperties
getLineHeight, getTextBold, getTextColor, getTextDecoration, getTextFont, getTextItalic, getTextSize, setLineHeight, setTextBold, setTextColor, setTextDecoration, setTextFont, setTextItalic, setTextSize
-
Method Details
-
isMultipleFilesSupported
boolean isMultipleFilesSupported()Returns true if multiple files can be uploaded at once, otherwise returns false.- Since:
- V5.10
-
setMultipleFilesSupported
void setMultipleFilesSupported(boolean multipleFilesSupported)If set to true, multiple files can be selected at once. If set to false, only one file can be selected.- Since:
- V5.10
-
isReplaceDuplicateFiles
boolean isReplaceDuplicateFiles()Returns true if files with duplicate names will be replaced, otherwise returns false. If false, a unique file will be created with _x appended to the original name. e.g myfile.txt is created as myfile_1.txt if the file already exists.- Since:
- V5.10
-
setReplaceDuplicateFiles
void setReplaceDuplicateFiles(boolean replaceDuplicateFiles)If set to true, files with duplicate names will be replaced. If set to false, a unique file will be created with _x appended to the original name. e.g myfile.txt is created as myfile_1.txt if the file already exists.- Since:
- V5.10
-
isImmediateUpload
boolean isImmediateUpload()Returns true if selected files are immediately uploaded, otherwise returns false. If false, anInitiateUploadControl
is required to upload the files.- Since:
- V5.10
-
setImmediateUpload
void setImmediateUpload(boolean immediateUpload)If set to true, selected files are immediately uploaded. If set to false, anInitiateUploadControl
is required to upload the files.- Since:
- V5.10
-
getFileTypes
java.lang.String getFileTypes()Returns a comma separated string of permitted file and MIME types. The file chooser displays only files of this type by default, but files of any type can be selected. Client-side validation will ensure that only files with a permitted extension can be uploaded.- Since:
- V5.10
-
setFileTypes
void setFileTypes(java.lang.String fileTypes)Sets a comma separated string of permitted file and MIME types. The file chooser displays only files of this type by default, but files of any type can be selected. Client-side validation will ensure that only files with a permitted extension can be uploaded.- Since:
- V5.10
-
getTargetDirectory
java.lang.String getTargetDirectory()Returns the target directory as a relative or absolute path.- Since:
- V5.10
-
setTargetDirectory
void setTargetDirectory(java.lang.String targetDirectory)Sets the target directory as a relative or absolute path.- Since:
- V5.10
-
getMaximumFileSize
java.lang.String getMaximumFileSize()Returns the maximum file size. This is a numerical value of bytes, or xK, xM, or xG for kilobytes, megabytes and gigabytes respectively. E.g. 50M is a maximum file size of 50 megabytes.- Since:
- V5.10
-
setMaximumFileSize
void setMaximumFileSize(java.lang.String maximumFileSize)Sets the maximum file size. This is a numerical value of bytes, or xK, xM, or xG for kilobytes, megabytes and gigabytes respectively. E.g. 50M is a maximum file size of 50 megabytes.- Since:
- V5.10
-
getFileItems
FileItemIterator getFileItems()Returns an iterator through FileItems representing the uploaded files. SeeFileItem
for more information.- Since:
- V5.10
-
getAssociatedFileUploadTextControls
java.util.ArrayList<com.ebasetech.ufs.runtime.controls.fileupload.FileUploadTextControl> getAssociatedFileUploadTextControls()Returns an ArrayList of all FileUploadText controls linked to this.- Since:
- V5.10
-