|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.speakright.core.FlowBase
org.speakright.core.flows.QuestionFlow
org.speakright.sro.BaseSROQuestion
public class BaseSROQuestion
Base class for all SROs (SpeakRight Objects). SROs are re-usable "speech objects" for common things like dates, times, numbers, and currency. Each SRO has
| Nested Class Summary | |
|---|---|
class |
BaseSROQuestion.MyConfirmationWrapper
|
| Field Summary | |
|---|---|
protected ChoiceFlow |
m_cmds
|
protected java.lang.String |
m_main1Prompt
|
protected int |
m_maxReExecutions
|
protected java.lang.String |
m_modelVar
|
protected java.lang.String |
m_noreco1Prompt
|
protected java.lang.String |
m_noreco2Prompt
|
protected java.lang.String |
m_noreco3Prompt
|
protected java.lang.String |
m_noreco4Prompt
|
protected java.lang.String |
m_prefixPrompt
|
protected java.lang.String |
m_silence1Prompt
|
protected java.lang.String |
m_silence2Prompt
|
protected java.lang.String |
m_silence3Prompt
|
protected java.lang.String |
m_silence4Prompt
|
protected java.lang.String |
m_slotName
|
protected SROSubjectItem |
m_subject
|
protected java.lang.String |
m_subjectWord
|
| Fields inherited from class org.speakright.core.flows.QuestionFlow |
|---|
m_quest |
| Constructor Summary | |
|---|---|
BaseSROQuestion()
|
|
BaseSROQuestion(java.lang.String subject)
|
|
| Method Summary | |
|---|---|
void |
addCancelCommand(java.lang.String cmd)
Add a cancel command. |
void |
addCommand(java.lang.String cmd,
IFlow flow)
Adds a command such as "cancel" or "main menu". |
void |
execute(IExecutionContext context)
The default implementation of execute is to render this object. |
IFlow |
getNext(IFlow current,
SRResults results)
The default implementation of getNext is to return null. |
protected void |
initMainPrompt(IExecutionContext context,
java.lang.String normal,
java.lang.String validationFailed,
java.lang.String confirmationWasRejected)
A common pattern is that the main prompt changes depending on whether this is the first time we've asked the question, or we're re-asking the question because of validation-failure or confirmation-rejection. |
protected void |
initPrompt(PromptType type,
java.lang.String text)
|
protected void |
initPrompts()
|
protected void |
initPrompts(IExecutionContext context)
|
protected void |
initSubPrompts(Question quest)
|
IFlow |
onValidateFailed(IFlow current,
SRResults results)
The default implementation of onValidateFailed is to return null, indicating that this object does not handle validate-failed events. |
void |
set_main1Prompt(java.lang.String text)
|
void |
set_noreco1Prompt(java.lang.String text)
|
void |
set_noreco2Prompt(java.lang.String text)
|
void |
set_noreco3Prompt(java.lang.String text)
|
void |
set_noreco4Prompt(java.lang.String text)
|
void |
set_prefixPrompt(java.lang.String text)
|
void |
set_silence1Prompt(java.lang.String text)
|
void |
set_silence2Prompt(java.lang.String text)
|
void |
set_silence3Prompt(java.lang.String text)
|
void |
set_silence4Prompt(java.lang.String text)
|
void |
setConfirmer(IConfirmationFlow flow)
Set a confirmer. |
void |
setModelVar(java.lang.String modelVar)
|
protected void |
setPromptCondition(Prompt prompt,
java.lang.String condition)
|
protected void |
setSubjectPlurality(int num,
IExecutionContext context)
|
| Methods inherited from class org.speakright.core.flows.QuestionFlow |
|---|
add, addBinding, addGrammar, addGrammar, addPrompt, createRenderer, InitPrompts |
| Methods inherited from class org.speakright.core.FlowBase |
|---|
executionCount, fixupGrammar, fixupPrompt, getFirst, getSubFlowAfter, log, logError, name, onBegin, onCatch, onComplete, onDisconnect, onEnd, onNoInput, onPlatformError, onTransferFailed, promptGroup, setExecutionCount, setName, setPromptGroup, shouldExecute, validateInput |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String m_prefixPrompt
protected java.lang.String m_main1Prompt
protected java.lang.String m_silence1Prompt
protected java.lang.String m_silence2Prompt
protected java.lang.String m_silence3Prompt
protected java.lang.String m_silence4Prompt
protected java.lang.String m_noreco1Prompt
protected java.lang.String m_noreco2Prompt
protected java.lang.String m_noreco3Prompt
protected java.lang.String m_noreco4Prompt
protected int m_maxReExecutions
protected java.lang.String m_subjectWord
protected transient SROSubjectItem m_subject
protected java.lang.String m_slotName
protected java.lang.String m_modelVar
protected ChoiceFlow m_cmds
| Constructor Detail |
|---|
public BaseSROQuestion()
public BaseSROQuestion(java.lang.String subject)
| Method Detail |
|---|
public void set_prefixPrompt(java.lang.String text)
public void set_main1Prompt(java.lang.String text)
public void set_silence1Prompt(java.lang.String text)
public void set_silence2Prompt(java.lang.String text)
public void set_silence3Prompt(java.lang.String text)
public void set_silence4Prompt(java.lang.String text)
public void set_noreco1Prompt(java.lang.String text)
public void set_noreco2Prompt(java.lang.String text)
public void set_noreco3Prompt(java.lang.String text)
public void set_noreco4Prompt(java.lang.String text)
public void setModelVar(java.lang.String modelVar)
public void addCommand(java.lang.String cmd,
IFlow flow)
cmd - the user input string for this cmd.flow - IFlow to be executed when the user input equals choicepublic void addCancelCommand(java.lang.String cmd)
cmd - the command user inputprotected void initPrompts()
protected void initSubPrompts(Question quest)
protected void initPrompt(PromptType type,
java.lang.String text)
protected void initPrompts(IExecutionContext context)
protected void setSubjectPlurality(int num,
IExecutionContext context)
protected void initMainPrompt(IExecutionContext context,
java.lang.String normal,
java.lang.String validationFailed,
java.lang.String confirmationWasRejected)
context - normal - validationFailed - confirmationWasRejected - public void setConfirmer(IConfirmationFlow flow)
flow - a confirmer object, or null to clear the confirmer
protected void setPromptCondition(Prompt prompt,
java.lang.String condition)
public IFlow getNext(IFlow current,
SRResults results)
FlowBase
getNext in interface IFlowgetNext in class FlowBasecurrent - the currently executing flow object. More precisely, current is the flow
object that this object most recently returned from getFirst or getNext.results - the results of current's execution by the speech platform. Results
contains user input and/or events such as disconnect or platform-error.
public void execute(IExecutionContext context)
FlowBase
execute in interface IFlowexecute in class FlowBasecontext - Contains the page renderer.
public IFlow onValidateFailed(IFlow current,
SRResults results)
FlowBase
onValidateFailed in interface IFlowonValidateFailed in class FlowBasecurrent - the currently executing flow object.results - the results of current's execution. In this case results will
contain the user input that failed validation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||