org.apache.turbine.services.intake.model
Class FileItemField

java.lang.Object
  |
  +--org.apache.turbine.services.intake.model.Field
        |
        +--org.apache.turbine.services.intake.model.FileItemField

public class FileItemField
extends Field


Fields inherited from class org.apache.turbine.services.intake.model.Field
alwaysRequired, data, defaultValue, displayName, EMPTY, getter, group, ifRequiredMessage, initialized, isMultiValued, key, mapToObject, message, name, onError, required, retrievable, set_flag, setter, testValue, valArray, valid_flag, validator, validValue, VALUE_IF_ABSENT_KEY
 
Constructor Summary
FileItemField(XmlField field, Group group)
           
 
Method Summary
protected  void doSetValue(ParameterParser pp)
          converts the parameter to the correct Object.
protected  java.lang.String getDefaultValidator()
          A suitable validator.
 Field init(RunData data)
          Method called when this field (the group it belongs to) is pulled from the pool.
protected  void setDefaultValue(java.lang.String prop)
          Sets the default value for an FileItemField
protected  boolean validate(ParameterParser pp)
          Compares request data with constraints and sets the valid flag.
 
Methods inherited from class org.apache.turbine.services.intake.model.Field
dispose, getDefault, getDefaultValue, getDisplayName, getInitialValue, getKey, getMessage, getProperty, getTestValue, getValidator, getValue, getValueIfAbsent, init, isRequired, isSet, isValid, removeFromRequest, setDisplayName, setInitialValue, setMessage, setProperty, setRequired, setRequired, setTestValue, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

FileItemField

public FileItemField(XmlField field,
                     Group group)
              throws java.lang.Exception
Method Detail

setDefaultValue

protected void setDefaultValue(java.lang.String prop)
Sets the default value for an FileItemField
Overrides:
setDefaultValue in class Field

getDefaultValidator

protected java.lang.String getDefaultValidator()
A suitable validator.
Overrides:
getDefaultValidator in class Field
Returns:
"FileValidator"

init

public Field init(RunData data)
           throws TurbineException
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
Parameters:
data - a RunData value
Returns:
a Field value
Throws:
TurbineException - if an error occurs

validate

protected boolean validate(ParameterParser pp)
Compares request data with constraints and sets the valid flag.
Overrides:
validate in class Field

doSetValue

protected void doSetValue(ParameterParser pp)
converts the parameter to the correct Object.
Overrides:
doSetValue in class Field


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.