Package com.avoka.fc.core.click
Class VirusCheckerFileField
java.lang.Object
org.apache.click.control.AbstractControl
org.apache.click.control.Field
org.apache.click.control.FileField
com.avoka.fc.core.click.VirusCheckerFileField
- All Implemented Interfaces:
Serializable,org.apache.click.Control,org.apache.click.Stateful
public class VirusCheckerFileField
extends org.apache.click.control.FileField
Wrapper class for FileField to provide virus scanning functionality.
- Since:
- 23.04.2
- See Also:
-
Field Summary
FieldsFields inherited from class org.apache.click.control.FileField
fileItem, size, VALIDATE_FILEFIELD_FUNCTIONFields inherited from class org.apache.click.control.Field
disabled, error, focus, form, help, label, labelStyle, labelStyleClass, parentStyleClassHint, parentStyleHint, readonly, required, tabindex, title, trim, validate, valueFields inherited from class org.apache.click.control.AbstractControl
actionListener, attributes, behaviors, headElements, listener, listenerMethod, messages, name, parent, stylesFields inherited from interface org.apache.click.Control
CONTROL_MESSAGES -
Constructor Summary
ConstructorsConstructorDescriptionConstruct the VirusCheckerFileFieldVirusCheckerFileField(String name) Construct the VirusCheckerFileField with the given name.VirusCheckerFileField(String name, boolean required) Construct the VirusCheckerFileField with the given name and required parameter.VirusCheckerFileField(String name, String label) Construct the VirusCheckerFileField with the given name and label.VirusCheckerFileField(String name, String label, boolean required) Construct the VirusCheckerFileField with the given name, label and required parameter.VirusCheckerFileField(String name, String label, int size) Construct the VirusCheckerFileField with the given name, label and size. -
Method Summary
Modifier and TypeMethodDescriptionvoidThis method binds the submitted file item to the Filefield 's fileItem value ifDeploymentProperty.PROPERTY_ENABLE_VIRUS_SCAN_FOR_UPLOADSis true and file is virus free.voidvalidate()This method Validates the FileField request submission and sets validation error when the virus check fails .Methods inherited from class org.apache.click.control.FileField
getControlSizeEst, getFileItem, getSize, getTag, getType, getValidationJavaScript, getValueObject, onProcess, render, setSizeMethods inherited from class org.apache.click.control.Field
getError, getErrorLabel, getFocus, getFocusJavaScript, getForm, getHelp, getId, getLabel, getLabelStyle, getLabelStyleClass, getParentStyleClassHint, getParentStyleHint, getRequestValue, getState, getTabIndex, getTextAlign, getTitle, getValidate, getValue, getWidth, isAutofocus, isDisabled, isHidden, isReadonly, isRequired, isTrim, isValid, removeState, renderTagBegin, restoreState, saveState, setAutofocus, setDisabled, setError, setErrorMessage, setErrorMessage, setFocus, setForm, setHelp, setLabel, setLabelStyle, setLabelStyleClass, setListener, setParent, setParentStyleClassHint, setParentStyleHint, setReadonly, setRequired, setState, setTabIndex, setTextAlign, setTitle, setTrim, setValidate, setValue, setValueObject, setWidthMethods inherited from class org.apache.click.control.AbstractControl
addBehavior, addStyleClass, appendAttributes, classExists, dispatchActionEvent, getActionListener, getAttribute, getAttributes, getBehaviors, getContext, getHeadElements, getHtmlImports, getMessage, getMessage, getMessages, getName, getPage, getParent, getStyle, getStyles, hasAttribute, hasAttributes, hasBehaviors, hasStyles, isAjaxTarget, onDeploy, onDestroy, onInit, onRender, removeBehavior, removeStyleClass, renderTagEnd, setActionListener, setAttribute, setId, setName, setStyle, toString
-
Field Details
-
message
The messaged to be displayed.
-
-
Constructor Details
-
VirusCheckerFileField
Construct the VirusCheckerFileField with the given name.- Parameters:
name- the name of the field
-
VirusCheckerFileField
Construct the VirusCheckerFileField with the given name and required parameter.- Parameters:
name- the name of the fieldrequired- marks field as required
-
VirusCheckerFileField
Construct the VirusCheckerFileField with the given name and label.- Parameters:
name- the name of the fieldlabel- the label of the field
-
VirusCheckerFileField
Construct the VirusCheckerFileField with the given name, label and required parameter.- Parameters:
name- the name of the fieldlabel- the label of the fieldrequired- marks field as required
-
VirusCheckerFileField
Construct the VirusCheckerFileField with the given name, label and size.- Parameters:
name- the name of the fieldlabel- the label of the fieldsize- of the field
-
VirusCheckerFileField
public VirusCheckerFileField()Construct the VirusCheckerFileField
-
-
Method Details
-
validate
public void validate()This method Validates the FileField request submission and sets validation error when the virus check fails .- Overrides:
validatein classorg.apache.click.control.FileField
-
bindRequestValue
public void bindRequestValue()This method binds the submitted file item to the Filefield 's fileItem value ifDeploymentProperty.PROPERTY_ENABLE_VIRUS_SCAN_FOR_UPLOADSis true and file is virus free.- Overrides:
bindRequestValuein classorg.apache.click.control.FileField
-