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.FileItemIteratorgetFileItems()Returns an iterator through FileItems representing the uploaded files.java.lang.StringgetFileTypes()Returns a comma separated string of permitted file and MIME types.java.lang.StringgetMaximumFileSize()Returns the maximum file size.java.lang.StringgetTargetDirectory()Returns the target directory as a relative or absolute path.booleanisImmediateUpload()Returns true if selected files are immediately uploaded, otherwise returns false.booleanisMultipleFilesSupported()Returns true if multiple files can be uploaded at once, otherwise returns false.booleanisReplaceDuplicateFiles()Returns true if files with duplicate names will be replaced, otherwise returns false.voidsetFileTypes(java.lang.String fileTypes)Sets a comma separated string of permitted file and MIME types.voidsetImmediateUpload(boolean immediateUpload)If set to true, selected files are immediately uploaded.voidsetMaximumFileSize(java.lang.String maximumFileSize)Sets the maximum file size.voidsetMultipleFilesSupported(boolean multipleFilesSupported)If set to true, multiple files can be selected at once.voidsetReplaceDuplicateFiles(boolean replaceDuplicateFiles)If set to true, files with duplicate names will be replaced.voidsetTargetDirectory(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, setBackgroundImageRepeatMethods inherited from interface com.ebasetech.xi.api.controls.BootstrapButtonStyle
getBootstrapSize, getBootstrapState, getBootstrapStyle, setBootstrapSize, setBootstrapState, setBootstrapStyleMethods inherited from interface com.ebasetech.xi.api.controls.BorderStyleProperties
getBorderColor, getBorderRadius, getBorderStyle, getBorderWidth, getBottomBorderWidth, getLeftBorderWidth, getRightBorderWidth, getTopBorderWidth, setBorderColor, setBorderRadius, setBorderStyle, setBorderWidth, setBottomBorderWidth, setLeftBorderWidth, setRightBorderWidth, setTopBorderWidthMethods inherited from interface com.ebasetech.xi.api.controls.ButtonControlProperties
getButtonText, getMouseOverText, isDisabled, isSkipValidation, setDisabled, setSkipValidationMethods 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, showMethods inherited from interface com.ebasetech.xi.api.Element
getElementName, getElementTypeMethods inherited from interface com.ebasetech.xi.api.controls.MarginStyleProperties
getAllMargin, getBottomMargin, getLeftMargin, getRightMargin, getTopMargin, setAllMargin, setBottomMargin, setLeftMargin, setRightMargin, setTopMarginMethods 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, existWarningMessagesMethods inherited from interface com.ebasetech.xi.api.controls.MessageProperties
getErrorMessageStyle, getInfoMessageStyle, getWarningMessageStyleMethods inherited from interface com.ebasetech.xi.api.controls.PaddingStyleProperties
getAllPadding, getBottomPadding, getLeftPadding, getRightPadding, getTopPadding, setAllPadding, setBottomPadding, setLeftPadding, setRightPadding, setTopPaddingMethods 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, anInitiateUploadControlis 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, anInitiateUploadControlis 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. SeeFileItemfor 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
-