Class UploadPartField

java.lang.Object
org.apache.fulcrum.intake.model.Field<jakarta.servlet.http.Part>
org.apache.fulcrum.intake.model.UploadPartField
All Implemented Interfaces:
Serializable, org.apache.avalon.framework.logger.LogEnabled

public class UploadPartField extends Field<jakarta.servlet.http.Part>
Version:
$Id$
Author:
John McNally, Henning P. Schmiedehausen, Quinton McCombs
See Also:
  • Constructor Details

    • UploadPartField

      public UploadPartField(XmlField field, Group group) throws IntakeException
      Constructor.
      Parameters:
      field - xml field definition object
      group - xml group definition object
      Throws:
      IntakeException - thrown by superclass
  • Method Details

    • setDefaultValue

      public void setDefaultValue(String prop)
      It is not possible to set the default value for this field type. Calling this method with a non-null parameter will result in a IntakeRuntimeException
      Specified by:
      setDefaultValue in class Field<jakarta.servlet.http.Part>
      Parameters:
      prop - Parameter for the default values
      Throws:
      IntakeRuntimeException - if the parameter is not null
    • setEmptyValue

      public void setEmptyValue(String prop)
      It is not possible to set the empty value for this field type. Calling this method with a non-null parameter will result in a IntakeRuntimeException
      Specified by:
      setEmptyValue in class Field<jakarta.servlet.http.Part>
      Parameters:
      prop - Parameter for the empty values
      Throws:
      IntakeRuntimeException - if the parameter is not null
    • getDefaultValidator

      protected String getDefaultValidator()
      A suitable validator.
      Overrides:
      getDefaultValidator in class Field<jakarta.servlet.http.Part>
      Returns:
      A suitable validator
    • init

      public Field<jakarta.servlet.http.Part> init(org.apache.fulcrum.parser.ValueParser vp) throws IntakeException
      Method called when this field (the group it belongs to) is pulled from the pool. The request data is searched to determine if a value has been supplied for this field. if so, the value is validated.
      Overrides:
      init in class Field<jakarta.servlet.http.Part>
      Parameters:
      vp - a ValueParser value
      Returns:
      a Field value
      Throws:
      IntakeException - if an error occurs
    • validate

      public boolean validate()
      Compares request data with constraints and sets the valid flag.
      Overrides:
      validate in class Field<jakarta.servlet.http.Part>
      Returns:
      the valid flag
    • doSetValue

      protected void doSetValue()
      Sets the value of the field from data in the parser.
      Specified by:
      doSetValue in class Field<jakarta.servlet.http.Part>