Package org.apache.fulcrum.intake.model
Class ShortField
- java.lang.Object
- 
- org.apache.fulcrum.intake.model.Field<Short>
- 
- org.apache.fulcrum.intake.model.ShortField
 
 
- 
- All Implemented Interfaces:
- Serializable,- org.apache.avalon.framework.logger.LogEnabled
 
 public class ShortField extends Field<Short> Processor for short fields.- Version:
- $Id$
- See Also:
- Serialized Form
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.fulcrum.intake.model.FielddefaultFieldPackage, defaultValidatorPackage, defaultValue, emptyValue, log, mapToObject, parser
 
- 
 - 
Constructor SummaryConstructors Constructor Description ShortField(XmlField field, Group group)Constructor.
 - 
Method SummaryAll 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()A suitable validator.protected ObjectgetSafeEmptyValue()Provides access to emptyValue such that the value returned will be acceptable as an argument parameter to Method.invoke.voidsetDefaultValue(String prop)Sets the default value for an Short FieldvoidsetEmptyValue(String prop)Set the empty Value.- 
Methods inherited from class org.apache.fulcrum.intake.model.Fielddispose, enableLogging, getDefault, getDefaultValue, getDisplayName, getDisplaySize, getEmptyValue, getGroup, getHTMLString, getInitialValue, getKey, getLocale, getMapToObject, getMaxSize, getMessage, getName, getProperty, getStringValue, getTestValue, getValidator, getValue, getValueIfAbsent, init, init, initGetterAndSetter, isMultiValued, isRequired, isSet, isValid, isValidated, removeFromRequest, setDisplayName, setMessage, setProperty, setRequired, setRequired, setSet, setValid, setValidated, toString, validate
 
- 
 
- 
- 
- 
Constructor Detail- 
ShortFieldpublic ShortField(XmlField field, Group group) throws IntakeException Constructor.- Parameters:
- field- xml field definition object
- group- xml group definition object
- Throws:
- IntakeException- thrown by superclass
 
 
- 
 - 
Method Detail- 
setDefaultValuepublic void setDefaultValue(String prop) Sets the default value for an Short Field- Specified by:
- setDefaultValuein class- Field<Short>
- Parameters:
- prop- Parameter for the default values
 
 - 
setEmptyValuepublic 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 class- Field<Short>
- Parameters:
- prop- The value to use if the field is empty.
 
 - 
getSafeEmptyValueprotected Object getSafeEmptyValue() Provides access to emptyValue such that the value returned will be acceptable as an argument parameter to Method.invoke. Subclasses that deal with primitive types should ensure that they return an appropriate value wrapped in the object wrapper class for the primitive type.- Overrides:
- getSafeEmptyValuein class- Field<Short>
- Returns:
- the value to use when the field is empty or an Object that wraps the empty value for primitive types.
 
 - 
getDefaultValidatorprotected String getDefaultValidator() A suitable validator.- Overrides:
- getDefaultValidatorin class- Field<Short>
- Returns:
- A suitable validator
 
 - 
doSetValueprotected void doSetValue() Sets the value of the field from data in the parser.- Specified by:
- doSetValuein class- Field<Short>
 
 
- 
 
-