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

java.lang.Object
  extended byorg.apache.turbine.services.intake.model.Field
      extended byorg.apache.turbine.services.intake.model.BigDecimalField
Direct Known Subclasses:
NumberKeyField

public class BigDecimalField
extends Field

Version:
$Id: BigDecimalField.java 264148 2005-08-29 14:21:04Z henning $
Author:
John McNally, Daniel Rall, Henning P. Schmiedehausen, Quinton McCombs

Field Summary
 
Fields inherited from class org.apache.turbine.services.intake.model.Field
alwaysRequired, defaultFieldPackage, defaultValue, displayName, emptyValue, getter, group, ifRequiredMessage, initialized, isDebugEnabled, isMultiValued, key, log, mapToObject, message, name, onError, parser, required, retrievable, setFlag, setter, validator, validFlag
 
Constructor Summary
BigDecimalField(XmlField field, Group group)
          Constructor.
 
Method Summary
protected  java.math.BigDecimal canonicalizeDecimalInput(java.lang.String bigDecimal)
          Canonicalizes an user-inputted BigDecimal string to the system's internal format.
protected  void doSetValue()
          Sets the value of the field from data in the parser.
protected  java.lang.String getDefaultValidator()
          A suitable validator.
 void setDefaultValue(java.lang.String prop)
          Sets the default value for a BigDecimal field
 void setEmptyValue(java.lang.String prop)
          Set the empty Value.
 
Methods inherited from class org.apache.turbine.services.intake.model.Field
dispose, doSetValue, getDefault, getDefaultValue, getDisplayName, getDisplaySize, getEmptyValue, getHTMLString, getInitialValue, getKey, getLocale, getMaxSize, getMessage, getName, getProperty, getSafeEmptyValue, getStringValue, getTestValue, getValidator, getValue, getValueIfAbsent, init, init, isRequired, isSet, isValid, removeFromRequest, setDisplayName, setMessage, setProperty, setRequired, setRequired, toString, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BigDecimalField

public BigDecimalField(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

setDefaultValue

public void setDefaultValue(java.lang.String prop)
Sets the default value for a BigDecimal field

Specified by:
setDefaultValue in class Field
Parameters:
prop - Parameter for the default values

setEmptyValue

public void setEmptyValue(java.lang.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:
setEmptyValue in class Field
Parameters:
prop - The value to use if the field is empty.

getDefaultValidator

protected java.lang.String getDefaultValidator()
A suitable validator.

Overrides:
getDefaultValidator in class Field
Returns:
A suitable validator

doSetValue

protected void doSetValue()
Sets the value of the field from data in the parser.

Specified by:
doSetValue in class Field

canonicalizeDecimalInput

protected final java.math.BigDecimal canonicalizeDecimalInput(java.lang.String bigDecimal)
Canonicalizes an user-inputted BigDecimal string to the system's internal format.

Parameters:
bigDecimal - Text conforming to a BigDecimal description for a set of DecimalFormatSymbols.
Returns:
The canonicalized representation.


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