|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.taglibs.rdc.core.BaseModel org.apache.taglibs.rdc.Currency
public class Currency
Datamodel for the currency RDC. The currency RDC will be associated with the currency input, the maximum and minimum values within which the input must lie and the currency code. The currency value and the maximum and minimum values has an expected format of the form UUUmm.nn or mm.nn where UUU is the ISO 4217 currency code, mmm is integer part and nn is the fractional part. If currency code is not specified the defaultcurrency code for the default locale is assumed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.taglibs.rdc.core.BaseModel |
---|
BaseModel.ValueInterpreter |
Field Summary | |
---|---|
static int |
ERR_NEED_HIGHER_VALUE
A constant for Error Code stating the currency entered is lower than allowed |
static int |
ERR_NEED_LOWER_VALUE
A constant for Error Code stating the currency entered is higher than allowed |
Fields inherited from class org.apache.taglibs.rdc.core.BaseModel |
---|
ambiguousValues, candidates, canonicalizedValue, className, configuration, confirm, confirmed, DEFAULT_INITIAL_GRAMMAR_NAME, DEFAULT_MIN_CONFIDENCE, DEFAULT_NUM_N_BEST, echo, ERR_NO_DEFAULT, ERR_NONE, errorCode, exitStatus, grammars, id, initial, initialGrammar, interpretation, isAmbiguous, isValid, locale, maxNoInput, maxNoMatch, minConfidence, numNBest, paramsMap, PROPERTY_INITIAL_GRAMMAR, rdcLocale, rdcResourceBundle, skipSubmit, state, subdialog, submit, utterance, value |
Constructor Summary | |
---|---|
Currency()
Sets default values for all data model members |
Method Summary | |
---|---|
protected java.lang.Object |
canonicalize(java.lang.Object input,
boolean isAttribute)
Sets up maximum or minimum permissible value. |
java.lang.String |
getCurrencyCode()
Gets the currency code for the currency used |
java.lang.String |
getMaxValue()
Gets the maximum allowed value for the amount |
java.lang.String |
getMinValue()
Gets the minimum allowed value for the amount |
void |
setCurrencyCode(java.lang.String code)
Sets the specified currency code |
void |
setMaxValue(java.lang.String maxValue)
Sets the maximum allowed value for the amount |
void |
setMinValue(java.lang.String minValue)
Sets the minimum allowed value for the amount |
protected java.lang.Boolean |
validate(java.lang.Object newValue,
boolean setErrorCode)
Validates the amount value against the given constraints |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ERR_NEED_LOWER_VALUE
public static final int ERR_NEED_HIGHER_VALUE
Constructor Detail |
---|
public Currency()
Method Detail |
---|
public java.lang.String getCurrencyCode()
public void setCurrencyCode(java.lang.String code)
code
- The currency code as defined in ISO 4217 standardspublic java.lang.String getMaxValue()
public void setMaxValue(java.lang.String maxValue)
maxValue
- The maximum allowed valuepublic java.lang.String getMinValue()
public void setMinValue(java.lang.String minValue)
minValue
- The minimum allowed valueprotected java.lang.Object canonicalize(java.lang.Object input, boolean isAttribute)
canonicalize
in class BaseModel
input
- The maximum or minimum amount, either in UUUmm.nn or mm.nn formatisAttribute
- Whether the input is passed via a tag attribute
protected java.lang.Boolean validate(java.lang.Object newValue, boolean setErrorCode)
validate
in class BaseModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |