org.speakright.core
Interface IConfirmationFlow

All Superinterfaces:
IFlow, java.io.Serializable
All Known Implementing Classes:
SROConfirmYesNo, TestConfirmation.ConfYNFlow

public interface IConfirmationFlow
extends IFlow

A flow that does confirmation (of a previous question). Used by ConfirmationWrapper. IConfirmationFlow is an extension point; you can create your own type of confirmation objects to implement various forms of confirmation such as explicit, implicit, confirm-and-correct, etc.

Author:
Ian Rae

Method Summary
 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 interface org.speakright.core.IFlow
createRenderer, execute, executionCount, fixupGrammar, fixupPrompt, getFirst, getNext, getSubFlowAfter, name, onBegin, onCatch, onComplete, onDisconnect, onEnd, onNoInput, onPlatformError, onTransferFailed, onValidateFailed, promptGroup, setExecutionCount, setPromptGroup, shouldExecute, validateInput
 

Method Detail

needToExecute

boolean needToExecute(IFlow current,
                      SRResults results)
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.

Parameters:
current - the current flow objects
results - results from the question for which we may do confirmation.
Returns:
true if confirmation should be done.

setNotifier

void setNotifier(IConfirmationNotifier notifier)
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.

Parameters:
notifier - the confirmation wrapper