public interface TagStrategy
<catch> elements
Form initialization
Strategy of the interpreter and the FIA to initialize a form. When the
VoiceXmlInterpreter iterates overall VoiceXML tags, and asks a
TagStrategyFactory for a strategy how to initialize the current node.
If a matching strategy was found, it is executed.
Tag execution by the FIA
Strategy of the FIA to execute a Node. When the
FormInterpretationAlgorithm comes to a VoiceXML tag, it asks a
TagStrategyFactory for a strategy how to process the current node. If
a matching strategy was found, the strategy is executed.
Execution of a TagStrategy comprises the following steps:
newInstancegetAttributesevalAttributes(VoiceXmlInterpreterContext)validateAttributes(DataModel)execute
The tags for which a TagStrategy exists are executable content.
Executable content refers to a block of procedural logic. Such logic appears
in:
<block> form item.<filled> actions in forms and
InputItems.<catch>, <help>, et
cetera).| Modifier and Type | Method and Description |
|---|---|
void |
dumpNode(DataModel model,
org.jvoicexml.xml.VoiceXmlNode node)
Debugging facility to display the contents of all attributes in the node.
|
void |
evalAttributes(VoiceXmlInterpreterContext context)
Evaluates all attributes which have to be evaluated by the scripting
environment.
|
void |
execute(VoiceXmlInterpreterContext context,
VoiceXmlInterpreter interpreter,
FormInterpretationAlgorithm fia,
FormItem item,
org.jvoicexml.xml.VoiceXmlNode node)
Executes the strategy with the current parameters.
|
void |
executeLocal(VoiceXmlInterpreterContext context,
VoiceXmlInterpreter interpreter,
FormInterpretationAlgorithm fia,
FormItem item,
org.jvoicexml.xml.VoiceXmlNode node)
Executes the strategy with the current parameters local to a form item.
|
void |
getAttributes(VoiceXmlInterpreterContext context,
FormInterpretationAlgorithm fia,
org.jvoicexml.xml.VoiceXmlNode node)
Retrieves all attributes specified by the given node or by a
<property> tag and stores their values in the working
copy of this strategy. |
java.util.Collection<java.lang.String> |
getEvalAttributes()
Retrieves the names of all attributes, which have to be evaluated by the
scripting environment.
|
TagStrategy |
newInstance()
Factory method to get a new instance of this strategy.
|
void |
validateAttributes(DataModel model)
Validates the attributes of the current node.
|
TagStrategy newInstance()
FormInterpretationAlgorithmjava.util.Collection<java.lang.String> getEvalAttributes()
null if the
related node has not attributes to be evaluated.void getAttributes(VoiceXmlInterpreterContext context, FormInterpretationAlgorithm fia, org.jvoicexml.xml.VoiceXmlNode node)
<property> tag and stores their values in the working
copy of this strategy.context - The current VoiceXML interpreter context.fia - The current form interpretation algorithm, maybe
null if there is no current fia.node - The node to process.void evalAttributes(VoiceXmlInterpreterContext context) throws SemanticError
context - The current VoiceXML interpreter context.SemanticError - Error evaluating a variable.void validateAttributes(DataModel model) throws ErrorEvent
model - the employed data modelErrorEvent - Validation failed.void execute(VoiceXmlInterpreterContext context, VoiceXmlInterpreter interpreter, FormInterpretationAlgorithm fia, FormItem item, org.jvoicexml.xml.VoiceXmlNode node) throws JVoiceXMLEvent
context - The VoiceXML interpreter context.interpreter - The current VoiceXML interpreter.fia - The current form interpretation algorithm, maybe
null if there is no current fia.item - The current form item,maybe null if there is no
current form item.node - The current child node.JVoiceXMLEvent - Error while executing this strategy.void executeLocal(VoiceXmlInterpreterContext context, VoiceXmlInterpreter interpreter, FormInterpretationAlgorithm fia, FormItem item, org.jvoicexml.xml.VoiceXmlNode node) throws JVoiceXMLEvent
context - The VoiceXML interpreter context.interpreter - The current VoiceXML interpreter.fia - The current form interpretation algorithm, maybe
null if there is no current fia.item - The current form item,maybe null if there is no
current form item.node - The current child node.JVoiceXMLEvent - Error while executing this strategy.void dumpNode(DataModel model, org.jvoicexml.xml.VoiceXmlNode node)
model - the current data modelnode - the current node