|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jvoicexml.interpreter.tagstrategy.IfStrategy
public final class IfStrategy
Strategy of the FIA to execute an <if> node.
This class is also responsible to handle the <else>
and <elseif> tags since they can appear only as
children of the <if> tag.
Copyright © 2005-2006 JVoiceXML group - http://jvoicexml.sourceforge.net/
FormInterpretationAlgorithm,
If| Method Summary | |
|---|---|
Object |
clone()
|
void |
dumpNode(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,
VoiceXmlNode node)
Executes the strategy with the current parameters. Find the child nodes to execute and execute them. |
protected Object |
getAttribute(String name)
Retrieves the value of the given attribute. |
void |
getAttributes(VoiceXmlInterpreterContext context,
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. |
Collection<String> |
getEvalAttributes()
Retrieves the names of all attributes, which have to be evaluated by the scripting environment. |
protected boolean |
isAttributeDefined(String name)
Checks if the given attribute is defined, this means, neither null nor Context.getUndefinedValue(). |
TagStrategy |
newInstance()
Factory method to get a new instance of this strategy. |
void |
validateAttributes()
Validate the attributes of the current node. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public Collection<String> getEvalAttributes()
null
if the related node has not attributes to be evaluated.
public void execute(VoiceXmlInterpreterContext context,
VoiceXmlInterpreter interpreter,
FormInterpretationAlgorithm fia,
FormItem item,
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.public TagStrategy newInstance()
newInstance in interface TagStrategyFormInterpretationAlgorithm
public void getAttributes(VoiceXmlInterpreterContext context,
VoiceXmlNode node)
<property> tag and stores their
values in the working copy of this strategy.
getAttributes in interface TagStrategycontext - The current VoiceXML interpreter context.node - The node to process.
public void evalAttributes(VoiceXmlInterpreterContext context)
throws SemanticError
evalAttributes in interface TagStrategycontext - The current VoiceXML interpreter context.
SemanticError - Error evaluating a variable.
public void validateAttributes()
throws ErrorEvent
validateAttributes in interface TagStrategyErrorEvent - Validation failed.public Object clone()
clone in class Objectprotected Object getAttribute(String name)
name - Name of the attribute.
null if the attribute
has no associated value.protected boolean isAttributeDefined(String name)
null nor Context.getUndefinedValue().
name - Name of the attribute.
true if the attribute is defined.public void dumpNode(VoiceXmlNode node)
dumpNode in interface TagStrategynode - The current node.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||