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 void
Sets the value of the field from data in the parser.protected String
A 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.void
setDefaultValue
(String prop) It is not possible to set the default value for this field type.void
setEmptyValue
(String prop) It is not possible to set the empty value for this field type.boolean
validate()
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:
setDefaultValue
in 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:
setEmptyValue
in 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:
getDefaultValidator
in 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:
init
in classField<jakarta.servlet.http.Part>
- Parameters:
vp
- aValueParser
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. -
doSetValue
protected void doSetValue()Sets the value of the field from data in the parser.- Specified by:
doSetValue
in classField<jakarta.servlet.http.Part>
-