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

    Fields
    Modifier and Type
    Field
    Description
    protected String
    The messaged to be displayed.

    Fields inherited from class org.apache.click.control.FileField

    fileItem, size, VALIDATE_FILEFIELD_FUNCTION

    Fields inherited from class org.apache.click.control.Field

    disabled, error, focus, form, help, label, labelStyle, labelStyleClass, parentStyleClassHint, parentStyleHint, readonly, required, tabindex, title, trim, validate, value

    Fields inherited from class org.apache.click.control.AbstractControl

    actionListener, attributes, behaviors, headElements, listener, listenerMethod, messages, name, parent, styles

    Fields inherited from interface org.apache.click.Control

    CONTROL_MESSAGES
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct the VirusCheckerFileField
    Construct the VirusCheckerFileField with the given name.
    VirusCheckerFileField(String name, boolean required)
    Construct the VirusCheckerFileField with the given name and required parameter.
    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 Type
    Method
    Description
    void
    This method binds the submitted file item to the Filefield 's fileItem value if DeploymentProperty.PROPERTY_ENABLE_VIRUS_SCAN_FOR_UPLOADS is true and file is virus free.
    void
    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, setSize

    Methods 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, setWidth

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • message

      protected String message
      The messaged to be displayed.
  • Constructor Details

    • VirusCheckerFileField

      public VirusCheckerFileField(String name)
      Construct the VirusCheckerFileField with the given name.
      Parameters:
      name - the name of the field
    • VirusCheckerFileField

      public VirusCheckerFileField(String name, boolean required)
      Construct the VirusCheckerFileField with the given name and required parameter.
      Parameters:
      name - the name of the field
      required - marks field as required
    • VirusCheckerFileField

      public VirusCheckerFileField(String name, String label)
      Construct the VirusCheckerFileField with the given name and label.
      Parameters:
      name - the name of the field
      label - the label of the field
    • VirusCheckerFileField

      public VirusCheckerFileField(String name, String label, boolean required)
      Construct the VirusCheckerFileField with the given name, label and required parameter.
      Parameters:
      name - the name of the field
      label - the label of the field
      required - marks field as required
    • VirusCheckerFileField

      public VirusCheckerFileField(String name, String label, int size)
      Construct the VirusCheckerFileField with the given name, label and size.
      Parameters:
      name - the name of the field
      label - the label of the field
      size - 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:
      validate in class org.apache.click.control.FileField
    • bindRequestValue

      public void bindRequestValue()
      This method binds the submitted file item to the Filefield 's fileItem value if DeploymentProperty.PROPERTY_ENABLE_VIRUS_SCAN_FOR_UPLOADS is true and file is virus free.
      Overrides:
      bindRequestValue in class org.apache.click.control.FileField