org.speakright.core.tests
Class TestConfirmation.ConfYNFlow

java.lang.Object
  extended by org.speakright.core.FlowBase
      extended by org.speakright.core.flows.QuestionFlow
          extended by org.speakright.core.tests.TestConfirmation.ConfYNFlow
All Implemented Interfaces:
java.io.Serializable, IConfirmationFlow, IFlow
Enclosing class:
TestConfirmation

public static class TestConfirmation.ConfYNFlow
extends QuestionFlow
implements IConfirmationFlow

See Also:
Serialized Form

Field Summary
 Model M
           
 
Fields inherited from class org.speakright.core.flows.QuestionFlow
m_quest
 
Constructor Summary
TestConfirmation.ConfYNFlow()
           
 
Method Summary
 IFlow getNext(IFlow current, SRResults results)
          The default implementation of getNext is to return null.
 boolean needToExecute(IFlow current, SRResults results)
          Inspect the results to see if confirmation is needed.
 void setNotifier(IConfirmationNotifier notifier)
          Set the notifier, which MUST be called from within the confirmation flow's getNext.
 
Methods inherited from class org.speakright.core.flows.QuestionFlow
add, addBinding, addGrammar, addGrammar, addPrompt, createRenderer, InitPrompts
 
Methods inherited from class org.speakright.core.FlowBase
execute, executionCount, fixupGrammar, fixupPrompt, getFirst, getSubFlowAfter, log, logError, name, onBegin, onCatch, onComplete, onDisconnect, onEnd, onNoInput, onPlatformError, onTransferFailed, onValidateFailed, promptGroup, setExecutionCount, setName, setPromptGroup, shouldExecute, validateInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.speakright.core.IFlow
createRenderer, execute, executionCount, fixupGrammar, fixupPrompt, getFirst, getSubFlowAfter, name, onBegin, onCatch, onComplete, onDisconnect, onEnd, onNoInput, onPlatformError, onTransferFailed, onValidateFailed, promptGroup, setExecutionCount, setPromptGroup, shouldExecute, validateInput
 

Field Detail

M

public Model M
Constructor Detail

TestConfirmation.ConfYNFlow

public TestConfirmation.ConfYNFlow()
Method Detail

setNotifier

public void setNotifier(IConfirmationNotifier notifier)
Description copied from interface: IConfirmationFlow
Set the notifier, which MUST be called from within the confirmation flow's getNext. Used to notify the confirmation wrapper. MUST call this from getNext when the confirmation finishes.

Specified by:
setNotifier in interface IConfirmationFlow
Parameters:
notifier - the confirmation wrapper

needToExecute

public boolean needToExecute(IFlow current,
                             SRResults results)
Description copied from interface: IConfirmationFlow
Inspect the results to see if confirmation is needed. Some confirmers may only kick if in the confidence level of the previous answer was less than some threshold.

Specified by:
needToExecute in interface IConfirmationFlow
Parameters:
current - the current flow objects
results - results from the question for which we may do confirmation.
Returns:
true if confirmation should be done.

getNext

public IFlow getNext(IFlow current,
                     SRResults results)
Description copied from class: FlowBase
The default implementation of getNext is to return null.

Specified by:
getNext in interface IFlow
Overrides:
getNext in class FlowBase
Parameters:
current - 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.
Returns:
the next flow to run, or null which means this flow object is finished.