org.jvoicexml.interpreter.formitem
Class BlockFormItem

java.lang.Object
  extended by org.jvoicexml.interpreter.formitem.AbstractFormItem
      extended by org.jvoicexml.interpreter.formitem.ControlItem
          extended by org.jvoicexml.interpreter.formitem.BlockFormItem
All Implemented Interfaces:
DialogConstruct, FormItem, FormItemVisitable

public final class BlockFormItem
extends ControlItem

A sequence of procedural statements used for prompting and computation, but not for gathering input. A block has a (normally implicit) form item variable that is set to true, just before it is interpreted.

Version:
$Revision: 222 $

Copyright © 2005-2007 JVoiceXML group - http://jvoicexml.sourceforge.net/

Author:
Dirk Schnelle

Constructor Summary
BlockFormItem(VoiceXmlInterpreterContext context, VoiceXmlNode voiceNode)
          Create a new block form item.
 
Method Summary
 EventHandler accept(FormItemVisitor visitor)
          Execute the specific method of the visitor.
 Collection<AbstractCatchElement> getCatchElements()
          Get all nested <catch> elements.
 void setVisited()
          Mark this form item visited by setting the form item variable to true.
 
Methods inherited from class org.jvoicexml.interpreter.formitem.AbstractFormItem
getContext, getExpr, getFormItemVariable, getName, getNode, isSelectable, setFormItemVariable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockFormItem

public BlockFormItem(VoiceXmlInterpreterContext context,
                     VoiceXmlNode voiceNode)
Create a new block form item.

Parameters:
context - The current VoiceXmlInterpreterContext.
voiceNode - The corresponding XML node in the VoiceXML document.
Method Detail

setVisited

public void setVisited()
Mark this form item visited by setting the form item variable to true.


accept

public EventHandler accept(FormItemVisitor visitor)
                    throws JVoiceXMLEvent
Execute the specific method of the visitor.

Parameters:
visitor - The visitor to use.
Returns:
The event handler to use for the processing.
Throws:
JVoiceXMLEvent - Error or event visiting the form item.

getCatchElements

public Collection<AbstractCatchElement> getCatchElements()
Get all nested <catch> elements.

Specified by:
getCatchElements in interface FormItem
Overrides:
getCatchElements in class AbstractFormItem
Returns:
null, since a <block> must not contain nested catches.


Copyright © 2005-2007 JVoiceXML group.