Package org.apache.fulcrum.intake.model
Class StringField
- java.lang.Object
-
- org.apache.fulcrum.intake.model.Field<String>
-
- org.apache.fulcrum.intake.model.StringField
-
- All Implemented Interfaces:
Serializable,org.apache.avalon.framework.logger.LogEnabled
public class StringField extends Field<String>
Text field.- Version:
- $Id$
- Author:
- John McNally, Henning P. Schmiedehausen, Quinton McCombs
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.fulcrum.intake.model.Field
defaultFieldPackage, defaultValidatorPackage, defaultValue, emptyValue, log, mapToObject, parser
-
-
Constructor Summary
Constructors Constructor Description StringField(XmlField field, Group group)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoSetValue()Sets the value of the field from data in the parser.protected StringgetDefaultValidator()Produces the fully qualified class name of the default validator.voidsetDefaultValue(String prop)Sets the default value for a String fieldvoidsetEmptyValue(String prop)Set the empty Value.voidsetRequired(boolean v, String message)Set the value of required.-
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, init, initGetterAndSetter, isMultiValued, isRequired, isSet, isValid, isValidated, removeFromRequest, setDisplayName, setMessage, setProperty, setRequired, setSet, setValid, setValidated, toString, validate
-
-
-
-
Constructor Detail
-
StringField
public StringField(XmlField field, Group group) throws IntakeException
Constructor.- Parameters:
field- xml field definition objectgroup- xml group definition object- Throws:
IntakeException- thrown by superclass
-
-
Method Detail
-
getDefaultValidator
protected String getDefaultValidator()
Produces the fully qualified class name of the default validator.- Overrides:
getDefaultValidatorin classField<String>- Returns:
- class name of the default validator
-
setDefaultValue
public void setDefaultValue(String prop)
Sets the default value for a String field- Specified by:
setDefaultValuein classField<String>- Parameters:
prop- Parameter for the default values
-
setEmptyValue
public void setEmptyValue(String prop)
Set the empty Value. This value is used if Intake maps a field to a parameter returned by the user and the corresponding field is either empty (empty string) or non-existant.- Specified by:
setEmptyValuein classField<String>- Parameters:
prop- The value to use if the field is empty.
-
doSetValue
protected void doSetValue()
Sets the value of the field from data in the parser.- Specified by:
doSetValuein classField<String>
-
setRequired
public void setRequired(boolean v, String message)
Set the value of required.- Overrides:
setRequiredin classField<String>- Parameters:
v- Value to assign to required.message- an error message
-
-