Package org.apache.fulcrum.intake.model
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
- Version:
- $Id$
- Author:
- John McNally, Henning P. Schmiedehausen, Quinton McCombs
- See Also:
-
Field Summary
Fields inherited from class org.apache.fulcrum.intake.model.Field
defaultFieldPackage, defaultValidatorPackage, defaultValue, emptyValue, log, mapToObject, parser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidSets the value of the field from data in the parser.protected StringA suitable validator.Field<jakarta.servlet.http.Part> init(org.apache.fulcrum.parser.ValueParser vp) Method called when this field (the group it belongs to) is pulled from the pool.voidsetDefaultValue(String prop) It is not possible to set the default value for this field type.voidsetEmptyValue(String prop) It is not possible to set the empty value for this field type.booleanvalidate()Compares request data with constraints and sets the valid flag.Methods inherited from class org.apache.fulcrum.intake.model.Field
dispose, enableLogging, getDefault, getDefaultValue, getDisplayName, getDisplaySize, getEmptyValue, getGroup, getHTMLString, getInitialValue, getKey, getLocale, getMapToObject, getMaxSize, getMessage, getName, getProperty, getSafeEmptyValue, getStringValue, getTestValue, getValidator, getValue, getValueIfAbsent, init, initGetterAndSetter, isMultiValued, isRequired, isSet, isValid, isValidated, removeFromRequest, setDisplayName, setMessage, setProperty, setRequired, setRequired, setSet, setValid, setValidated, toString
-
Constructor Details
-
UploadPartField
Constructor.- Parameters:
field- xml field definition objectgroup- xml group definition object- Throws:
IntakeException- thrown by superclass
-
-
Method Details
-
setDefaultValue
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:
setDefaultValuein classField<jakarta.servlet.http.Part>- Parameters:
prop- Parameter for the default values- Throws:
IntakeRuntimeException- if the parameter is not null
-
setEmptyValue
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:
setEmptyValuein classField<jakarta.servlet.http.Part>- Parameters:
prop- Parameter for the empty values- Throws:
IntakeRuntimeException- if the parameter is not null
-
getDefaultValidator
A suitable validator.- Overrides:
getDefaultValidatorin classField<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:
initin classField<jakarta.servlet.http.Part>- Parameters:
vp- aValueParservalue- Returns:
- a
Fieldvalue - Throws:
IntakeException- if an error occurs
-
validate
public boolean validate()Compares request data with constraints and sets the valid flag. -
doSetValue
protected void doSetValue()Sets the value of the field from data in the parser.- Specified by:
doSetValuein classField<jakarta.servlet.http.Part>
-