org.speakright.core
Interface IExecutionContext

All Superinterfaces:
IFlowContext
All Known Implementing Classes:
ExecutionContext

public interface IExecutionContext
extends IFlowContext

A context object passed to the execute method of a flow object. It contains various things that a flow object might want to do inside execute.

Author:
IanRaeLaptop

Method Summary
 boolean ConfirmationWasRejected()
          Return true if a confirmation was rejected by the user (by saying 'no' or whatever rejection phrase was in the confirmation grammar).
 SRResults getResults()
          Get the results of the previous turn.
 void registerPromptFile(java.lang.String path)
          Register (temporarily) a prompt XML file.
 void render(IFlow flow)
          Render the given flow object into a voicexml page.
 void throwEvent(ThrowEvent event)
          Throw a custom event.
 boolean ValidateFailed()
          Return true if the call to ValidateInput for this flow returned false.
 
Methods inherited from interface org.speakright.core.IFlowContext
getLocations
 

Method Detail

throwEvent

void throwEvent(ThrowEvent event)
Throw a custom event.

Parameters:
event -

render

void render(IFlow flow)
Render the given flow object into a voicexml page.

Parameters:
flow - a flow object

registerPromptFile

void registerPromptFile(java.lang.String path)
Register (temporarily) a prompt XML file. The registration only used during the current execute method. If you want to register a prompt file for the life of the application use SRInstance.registerPromptFile

Parameters:
path - full file path to the prompts XML file.

getResults

SRResults getResults()
Get the results of the previous turn. MAY BE NULL (if this is the first flow in the app)


ValidateFailed

boolean ValidateFailed()
Return true if the call to ValidateInput for this flow returned false. This method avoids flow object classes to have to declare their own boolean to track validation failure. Only works in the context of the current execute.

Returns:
result of ValidateInput

ConfirmationWasRejected

boolean ConfirmationWasRejected()
Return true if a confirmation was rejected by the user (by saying 'no' or whatever rejection phrase was in the confirmation grammar). Set to true by ConfirmationWrapper just before the previous question (flow object) executes again. This method is used by questions to alter their prompts, to add something like "OK, let's try that again".

Returns:
result of confirmation. false if no confirmation is active.