|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IModelBinder
IModelBinder binds user input to values in the model. When a flow object executes it can add bindings for slots in the SML that the speech platform will return. If the speech platform returns user input, the bindings are used to assign the user input data to values(s) in the model.
For example, a flow might ask the user for a city name, and tell SpeakRight to bind the SML slot "city" to the model value City (that is, M.City()).
| Method Summary | |
|---|---|
void |
addBinding(IFlow flow,
java.lang.String slotName,
java.lang.String modelVar)
Bind the given slot to a model variable. |
void |
bind(IFlow current,
SRResults results)
Inspect the results and bind any model variables that are bound to slot values in the results. |
boolean |
failed(SRError parent)
extracts any errors that the model binder logged. |
java.util.ArrayList |
getBindings()
Gets list of BindingSpec objects. |
IModel |
getModel()
Get the model object. |
java.lang.String |
getModelValue(java.lang.String methodName)
Get the value of the given model variable. |
void |
injectModel(IFlow flow)
Set the flow's model field. |
void |
setBindings(java.util.ArrayList bindingL)
Sets list of BindingSpec objects. |
void |
setModel(IModel model)
Set the model object. |
| Method Detail |
|---|
void injectModel(IFlow flow)
flow -
void addBinding(IFlow flow,
java.lang.String slotName,
java.lang.String modelVar)
flow - Flow object that creates a Question with the given slot.slotName - slot name.modelVar - model variable (the name of a field, eg "city")
void bind(IFlow current,
SRResults results)
current - currently executing flow object.results - speech rec results (from the voicexml platform).IModel getModel()
void setModel(IModel model)
model - the application instance's modeljava.lang.String getModelValue(java.lang.String methodName)
methodName - name of the model variable (eg. "city")
boolean failed(SRError parent)
parent - error object to copy error info into.
java.util.ArrayList getBindings()
void setBindings(java.util.ArrayList bindingL)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||