org.apache.taglibs.rdc.core
Class RDCTemplate

java.lang.Object
  extended by org.apache.taglibs.rdc.core.BaseModel
      extended by org.apache.taglibs.rdc.core.RDCTemplate
All Implemented Interfaces:
java.io.Serializable

public class RDCTemplate
extends BaseModel

A basic template using the default atomic FSM, meant to slash component development effort.

Author:
Rahul Akolkar
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.taglibs.rdc.core.BaseModel
BaseModel.ValueInterpreter
 
Field Summary
protected  java.lang.String bean
          The fully qualified class name of the model bean for this instance of the RDC template
protected  java.util.Map constraints
          The instance specific constraints on the value to be collected.
protected  java.lang.Object data
          The instance specific data that is passed in
protected  java.util.Map dynamicAttributes
          The instance specific dynamic tag attributes.
protected  java.lang.String fsmFragment
          The fragment that will override any or all of the default fsm as needed for this instance of the template
protected  boolean populateGrammars
          The property that governs whether we will attempt to populate this template instance with the grammars that will be passed in
 
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
RDCTemplate()
          Sets default values for all data members
 
Method Summary
 java.lang.String getBean()
          Get the data value that was passed in
 java.util.Map getConstraints()
          Get the constraints on the value to be collected.
 java.lang.Object getData()
          Get the data value that was passed in
 java.lang.String getFsmFragment()
          Get the tag fragment URI overriding the default FSM defined in <fsm-run>
 void initComponentGrammars()
          Hook for instances to prepare grammars for first round trip
 void setBean(java.lang.String bean)
          Sets the bean value
 void setConstraints(java.util.Map constraints)
          Set the constraints on the value to be collected
 void setData(java.lang.Object data)
          Sets the data value
 void setDynamicAttributes(java.util.Map dynamicAttributes)
          Set the dynamic attributes data received from this tag instance
 void setFsmFragment(java.lang.String fsmFragment)
          Set the tag fragment URI overriding the default FSM defined in <fsm-run>
 void setGrammar(java.lang.Object grammar)
          Sets the grammar(s).
 
Methods inherited from class org.apache.taglibs.rdc.core.BaseModel
baseCanonicalize, baseValidate, calculateCanonicalizedValue, canonicalize, getAmbiguousValues, getCandidates, getCanonicalizedValue, getClassName, getConfiguration, getConfirm, getConfirmed, getEcho, getERR_NO_DEFAULT, getERR_NONE, getErrorCode, getExitStatus, getGrammars, getId, getInitial, getInterpretation, getIsAmbiguous, getIsValid, getLocale, getMaxNoInput, getMaxNoMatch, getMinConfidence, getNumNBest, getParamsMap, getRdcLocale, getRdcResourceBundle, getSerializedValue, getSkipSubmit, getState, getSubdialog, getSubmit, getUtterance, getValue, setAmbiguousValues, setCandidates, setCanonicalizedValue, setConfiguration, setConfirm, setConfirmed, setEcho, setErrorCode, setExitStatus, setGrammar, setId, setInitial, setInterpretation, setIsAmbiguous, setIsValid, setLocale, setMaxNoInput, setMaxNoMatch, setMinConfidence, setNumNBest, setSkipSubmit, setState, setSubdialog, setSubmit, setUtterance, setValue, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected java.lang.Object data
The instance specific data that is passed in


bean

protected java.lang.String bean
The fully qualified class name of the model bean for this instance of the RDC template


fsmFragment

protected java.lang.String fsmFragment
The fragment that will override any or all of the default fsm as needed for this instance of the template


constraints

protected java.util.Map constraints
The instance specific constraints on the value to be collected.


dynamicAttributes

protected java.util.Map dynamicAttributes
The instance specific dynamic tag attributes.


populateGrammars

protected boolean populateGrammars
The property that governs whether we will attempt to populate this template instance with the grammars that will be passed in

Constructor Detail

RDCTemplate

public RDCTemplate()
Sets default values for all data members

Method Detail

getData

public java.lang.Object getData()
Get the data value that was passed in

Returns:
data

setData

public void setData(java.lang.Object data)
Sets the data value

Parameters:
data -

getBean

public java.lang.String getBean()
Get the data value that was passed in

Returns:
string bean

setBean

public void setBean(java.lang.String bean)
Sets the bean value

Parameters:
bean - The value bean

getFsmFragment

public java.lang.String getFsmFragment()
Get the tag fragment URI overriding the default FSM defined in <fsm-run>

Returns:
fsmTagFragment

setFsmFragment

public void setFsmFragment(java.lang.String fsmFragment)
Set the tag fragment URI overriding the default FSM defined in <fsm-run>

Parameters:
fsmFragment - The URI to the tag fragment

getConstraints

public java.util.Map getConstraints()
Get the constraints on the value to be collected. Only those constraints passed in via the constraints attribute of this instance of the template tag will be returned.

Returns:
constraints

setConstraints

public void setConstraints(java.util.Map constraints)
Set the constraints on the value to be collected

Parameters:
constraints -

setDynamicAttributes

public void setDynamicAttributes(java.util.Map dynamicAttributes)
Set the dynamic attributes data received from this tag instance

Parameters:
dynamicAttributes - The dynamic attributes name value map

setGrammar

public void setGrammar(java.lang.Object grammar)
Sets the grammar(s). The param can be an array of some combination of Grammar objects and string URIs or a Grammar object or a string URI.

Parameters:
grammar - The grammar to set

initComponentGrammars

public void initComponentGrammars()
Hook for instances to prepare grammars for first round trip



Copyright © 2004-2009 The Apache Software Foundation. All Rights Reserved.