|
||||||||||
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.Percent
public class Percent
Datamodel for the percent RDC. The percent RDC will be associated with the percentages (say 10%), the maximum and minimum percentage length within which the input's length must lie, and a pattern to which the input must conform.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.taglibs.rdc.core.BaseModel |
---|
BaseModel.ValueInterpreter |
Field Summary | |
---|---|
static int |
ERR_INVALID_PERCENT
A constant for Error Code stating Invalid percent |
static int |
ERR_NEED_HIGHER_VALUE
A constant for Error Code stating the percent entered is smaller than allowed |
static int |
ERR_NEED_LOWER_VALUE
A constant for Error Code stating the percent entered is larger 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 | |
---|---|
Percent()
Sets default values for all data model members |
Method Summary | |
---|---|
protected java.lang.String |
calculateCanonicalizedValue(java.lang.Object newValue)
Custom canonicalized value calculation |
java.lang.String |
getMaxPercent()
Gets the maximum allowed value for the percentage. |
java.lang.String |
getMinPercent()
Gets the minimum allowed value for the percentage |
java.lang.String |
getPattern()
Gets the pattern string |
void |
setMaxPercent(java.lang.String maxPercent)
Sets the maximum allowed value for the percentage |
void |
setMinPercent(java.lang.String minPercent)
Sets the minimum allowed value for the percentage |
void |
setPattern(java.lang.String pattern)
Sets the pattern string to which the input must conform |
protected java.lang.Boolean |
validate(java.lang.Object newValue,
boolean setErrorCode)
Validates the percent 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_INVALID_PERCENT
public static final int ERR_NEED_LOWER_VALUE
public static final int ERR_NEED_HIGHER_VALUE
Constructor Detail |
---|
public Percent()
Method Detail |
---|
public java.lang.String getMaxPercent()
public void setMaxPercent(java.lang.String maxPercent)
maxPercent
- The maximum allowed value for the percentagepublic java.lang.String getMinPercent()
public void setMinPercent(java.lang.String minPercent)
minPercent
- The minimum allowed value.public java.lang.String getPattern()
public void setPattern(java.lang.String pattern)
pattern
- the pattern string to which the input must conformprotected java.lang.Boolean validate(java.lang.Object newValue, boolean setErrorCode)
validate
in class BaseModel
protected java.lang.String calculateCanonicalizedValue(java.lang.Object newValue)
calculateCanonicalizedValue
in class BaseModel
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |