|
||||||||||||
| 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.Date
Datamodel for the date RDC. The date RDC will be associated with the date input, the maximum and minimum dates within which the date input must lie, and a date format to which the date input must conform.
| Nested Class Summary |
|---|
| Nested classes inherited from class org.apache.taglibs.rdc.core.BaseModel |
|---|
BaseModel.ValueInterpreter |
| Field Summary | |
|---|---|
static int |
ERR_INVALID_DATE
A constant for Error Code stating Invalid date |
static int |
ERR_NEED_EARLIER_DATE
A constant for Error Code stating the date entered is later than allowed |
static int |
ERR_NEED_LATER_DATE
A constant for Error Code stating the date entered is earlier 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 | |
|---|---|
Date()
Sets default values for all data members |
|
| Method Summary | |
|---|---|
protected java.lang.String |
calculateCanonicalizedValue(java.lang.Object newValue)
Builds a date string to be used for normalized output For e.g., 07082004 gets converted to July 8, 2004 |
protected java.lang.Object |
canonicalize(java.lang.Object input,
boolean isAttribute)
Sets up the date string, converting phrases of today and tomorrow into valid dates followed by the format filter |
java.lang.String |
getMaxDate()
Gets the Maximum Date value |
java.lang.String |
getMinDate()
Gets the Minimum Date value |
java.lang.Object |
getValue()
Get the date currently associated with this date component as a string in the specified format. |
void |
setFormat(java.lang.String strDateFormat)
Sets the date string format to use for vaidation |
void |
setMaxDate(java.lang.String strMaxDate)
Sets the Maximum Date value |
void |
setMinDate(java.lang.String strMinDate)
Sets the Minimum Date value |
protected java.lang.Boolean |
validate(java.lang.Object newValue,
boolean setErrorCode)
Validates the received input against the validation 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_DATE
public static final int ERR_NEED_LATER_DATE
public static final int ERR_NEED_EARLIER_DATE
| Constructor Detail |
public Date()
| Method Detail |
public void setFormat(java.lang.String strDateFormat)
strDateFormat - The date format stringpublic void setMaxDate(java.lang.String strMaxDate)
strMaxDate - The Maximum Date value (conforms to format)public java.lang.String getMaxDate()
public void setMinDate(java.lang.String strMinDate)
strMinDate - The Minimum Date value (conforms to format)public java.lang.String getMinDate()
public java.lang.Object getValue()
getValue in class BaseModel
protected java.lang.Object canonicalize(java.lang.Object input,
boolean isAttribute)
canonicalize in class BaseModelinput - the value
protected java.lang.Boolean validate(java.lang.Object newValue,
boolean setErrorCode)
validate in class BaseModelprotected 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 | |||||||||||