org.speakright.core.render
Class PlayOnceCondition

java.lang.Object
  extended by org.speakright.core.render.Prompt.PromptCondition
      extended by org.speakright.core.render.PlayOnceCondition
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PlayOnceEverCondition

public class PlayOnceCondition
extends Prompt.PromptCondition

A prompt condition that ensures a prompt is only played once. Often in a VUI we want to play a prompt the first time the user reaches some point, but not every time. The scope of this condition is a single activation of a flow object. An active object may have its execute method called one or more times. This condition ensures the prompt only is generated on the first execute.

Author:
IanRaeLaptop
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.speakright.core.render.Prompt.PromptCondition
m_value
 
Constructor Summary
PlayOnceCondition()
           
 
Method Summary
 void calculate(Prompt prompt, RenderContext rcontext)
          Calculate the current value of the condition.
 
Methods inherited from class org.speakright.core.render.Prompt.PromptCondition
value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayOnceCondition

public PlayOnceCondition()
Method Detail

calculate

public void calculate(Prompt prompt,
                      RenderContext rcontext)
Description copied from class: Prompt.PromptCondition
Calculate the current value of the condition.

Overrides:
calculate in class Prompt.PromptCondition
Parameters:
prompt - prompt that has the condition
rcontext - rendering context