org.jvoicexml.xml.vxml
Class Submit

java.lang.Object
  extended by org.jvoicexml.xml.AbstractXmlNode
      extended by org.jvoicexml.xml.vxml.Submit
All Implemented Interfaces:
VoiceXmlNode, XmlNode, Node

public final class Submit
extends AbstractXmlNode

Submit values to a document server.

The <submit> element is used to submit information to the origin Web server and then transition to the document sent back in the response. Unlike <goto>, it lets you submit a list of variables to the document server via an HTTP GET or POST request.

Version:
$Revision: 2436 $

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

Author:
Steve Doyle, Dirk Schnelle
See Also:
Goto

Field Summary
static String ATTRIBUTE_ENCTYPE
          The media encoding type of the submitted document (when the value of method is "post").
static String ATTRIBUTE_EXPR
          Like next, except that the URI reference is dynamically determined by evaluating the given ECMAScript expression.
static String ATTRIBUTE_FETCHAUDIO
          The URI of the audio clip to play while the fetch is being done.
static String ATTRIBUTE_FETCHHINT
          Defines when the interpreter context should retrieve content from the server. prefetch indicates a file may be downloaded when the page is loaded, whereas safe indicates a file that should only be downloaded when actually needed.
static String ATTRIBUTE_FETCHTIMEOUT
          The interval to wait for the content to be returned before throwing an error.badfetch event.
static String ATTRIBUTE_MAXAGE
          Indicates that the document is willing to use content whose age is no greater than the specified time in seconds.
static String ATTRIBUTE_MAXSTALE
          Indicates that the document is willing to use content that has exceeded its expiration time.
static String ATTRIBUTE_METHOD
          The request method: get (the default) or post.
static String ATTRIBUTE_NAMELIST
          The list of variables to submit.
protected static ArrayList<String> ATTRIBUTE_NAMES
          Supported attribute names for this node.
static String ATTRIBUTE_NEXT
          The URI reference.
static String TAG_NAME
          Name of the tag.
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
Submit()
          Construct a new submit object without a node.
 
Method Summary
protected  boolean canContainChild(String tagName)
          Can the specified sub-tag be contained within this node?
 Collection<String> getAttributeNames()
          Returns a collection of permitted attribute names for the node.
 String getEnctype()
          Retrieve the enctype attribute.
 String getExpr()
          Retrieve the expr attribute.
 String getFetchaudio()
          Retrieve the fetchaudio attribute.
 String getFetchhint()
          Retrieve the fetchhint attribute.
 String getFetchtimeout()
          Retrieve the fetchtimeout attribute.
 String getMaxage()
          Retrieve the maxage attribute.
 String getMaxstale()
          Retrieve the maxstale attribute.
 RequestMethod getMethod()
          Retrieve the method attribute.
 String getMethodName()
          Retrieve the method attribute.
 String getNamelist()
          Retrieve the namelist attribute.
 TokenList getNameListObject()
          Retrieve the namelist attribute as a list object.
 String getNext()
          Retrieve the next attribute.
 URI getNextUri()
          Retrieve the next attribute.
 String getTagName()
          Get the name of the tag for the derived node.
 XmlNode newInstance(Node n, XmlNodeFactory<? extends XmlNode> factory)
          Create a new instance for the given node.
 void setEnctype(String enctype)
          Set the enctype attribute.
 void setExpr(String expr)
          Set the expr attribute.
 void setFetchaudio(String fetchaudio)
          Set the fetchaudio attribute.
 void setFetchhint(String fetchhint)
          Set the fetchhint attribute.
 void setFetchtimeout(String fetchtimeout)
          Set the fetchtimeout attribute.
 void setMaxage(String maxage)
          Set the maxage attribute.
 void setMaxstale(String maxstale)
          Set the maxstale attribute.
 void setMethod(RequestMethod method)
          Set the method attribute.
 void setMethodName(String method)
          Set the method attribute.
 void setNamelist(String namelist)
          Set the namelist attribute.
 void setNameList(TokenList list)
          Set the namelist attribute.
 void setNext(String next)
          Set the next attribute.
 void setNextUri(URI next)
          Set the next attribute.
 
Methods inherited from class org.jvoicexml.xml.AbstractXmlNode
addChild, addChild, appendChild, appendChild, appendDeepClone, cloneNode, compareDocumentPosition, equals, getAttribute, getAttributes, getBaseURI, getChildNodes, getChildNodes, getChildren, getDefinedAttributeNames, getFeature, getFirstChild, getFirstLevelTextContent, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNode, getNodeFactory, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getOwnerXmlDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setAttribute, setNodeValue, setPrefix, setTextContent, setUserData, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jvoicexml.xml.XmlNode
addChild, getAttribute, getChildNodes, getChildren, getNode, setAttribute
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 

Field Detail

TAG_NAME

public static final String TAG_NAME
Name of the tag.

See Also:
Constant Field Values

ATTRIBUTE_NEXT

public static final String ATTRIBUTE_NEXT
The URI reference.

See Also:
Constant Field Values

ATTRIBUTE_EXPR

public static final String ATTRIBUTE_EXPR
Like next, except that the URI reference is dynamically determined by evaluating the given ECMAScript expression.

See Also:
Constant Field Values

ATTRIBUTE_NAMELIST

public static final String ATTRIBUTE_NAMELIST
The list of variables to submit. By default, all the named input item variables are submitted. If a namelist is supplied, it may contain individual variable references which are submitted with the same qualification used in the namelist. Declared VoiceXML and ECMAScript variables can be referenced. If an undeclared variable is referenced in the namelist, then an error.semantic is thrown.

See Also:
Constant Field Values

ATTRIBUTE_METHOD

public static final String ATTRIBUTE_METHOD
The request method: get (the default) or post.

See Also:
Constant Field Values

ATTRIBUTE_ENCTYPE

public static final String ATTRIBUTE_ENCTYPE
The media encoding type of the submitted document (when the value of method is "post"). The default is application/x-www-form-urlencoded. Interpreters must also support multipart/form-data and may support additional encoding types.

See Also:
Constant Field Values

ATTRIBUTE_FETCHAUDIO

public static final String ATTRIBUTE_FETCHAUDIO
The URI of the audio clip to play while the fetch is being done. If not specified, the fetchaudio property is used, and if that property is not set, no audio is played during the fetch. The fetching of the audio clip is governed by the audiofetchhint, audiomaxage, audiomaxstale, and fetchtimeout properties in effect at the time of the fetch. The playing of the audio clip is governed by the fetchaudiodelay, and fetchaudiominimum properties in effect at the time of the fetch.

See Also:
Constant Field Values

ATTRIBUTE_FETCHTIMEOUT

public static final String ATTRIBUTE_FETCHTIMEOUT
The interval to wait for the content to be returned before throwing an error.badfetch event. This defaults to the fetchtimeout property.

See Also:
Constant Field Values

ATTRIBUTE_FETCHHINT

public static final String ATTRIBUTE_FETCHHINT
Defines when the interpreter context should retrieve content from the server. prefetch indicates a file may be downloaded when the page is loaded, whereas safe indicates a file that should only be downloaded when actually needed. This defaults to the audiofetchhint property.

See Also:
Constant Field Values

ATTRIBUTE_MAXAGE

public static final String ATTRIBUTE_MAXAGE
Indicates that the document is willing to use content whose age is no greater than the specified time in seconds. The document is not willing to use stale content, unless maxstale is also provided. This defaults to the audiomaxage property.

See Also:
Constant Field Values

ATTRIBUTE_MAXSTALE

public static final String ATTRIBUTE_MAXSTALE
Indicates that the document is willing to use content that has exceeded its expiration time. If maxstale is assigned a value, then the document is willing to accept content that has exceeded its expiration time by no more than the specified number of seconds. This defaults to the audiomaxstale property.

See Also:
Constant Field Values

ATTRIBUTE_NAMES

protected static final ArrayList<String> ATTRIBUTE_NAMES
Supported attribute names for this node.

Constructor Detail

Submit

public Submit()
Construct a new submit object without a node.

This is necessary for the node factory.

See Also:
VoiceXmlNodeFactory
Method Detail

getTagName

public String getTagName()
Get the name of the tag for the derived node.

Returns:
name of the tag.

newInstance

public XmlNode newInstance(Node n,
                           XmlNodeFactory<? extends XmlNode> factory)
Create a new instance for the given node.

Each XmlNode can serve as a prototype in a XmlNodeFactory to produce a collection of child nodes. Factories can then use the prototype pattern to produce new nodes.

Parameters:
n - The node to encapsulate.
factory - the factroy that calls this method.
Returns:
The new instance.
See Also:
XmlNodeFactory

getNext

public String getNext()
Retrieve the next attribute.

Returns:
Value of the next attribute.
See Also:
ATTRIBUTE_NEXT

getNextUri

public URI getNextUri()
               throws URISyntaxException
Retrieve the next attribute.

Returns:
Value of the next attribute.
Throws:
URISyntaxException - Value is not a valid URI.
Since:
0.7
See Also:
ATTRIBUTE_NEXT

setNext

public void setNext(String next)
Set the next attribute.

Parameters:
next - Value of the next attribute.
See Also:
ATTRIBUTE_NEXT

setNextUri

public void setNextUri(URI next)
Set the next attribute.

Parameters:
next - Value of the next attribute.
Since:
0.7
See Also:
ATTRIBUTE_NEXT

getExpr

public String getExpr()
Retrieve the expr attribute.

Returns:
Value of the expr attribute.
See Also:
ATTRIBUTE_EXPR

setExpr

public void setExpr(String expr)
Set the expr attribute.

Parameters:
expr - Value of the expr attribute.
See Also:
ATTRIBUTE_EXPR

getNamelist

public String getNamelist()
Retrieve the namelist attribute.

Returns:
Value of the namelist attribute.
See Also:
ATTRIBUTE_NAMELIST, getNameListObject()

setNamelist

public void setNamelist(String namelist)
Set the namelist attribute.

Parameters:
namelist - Value of the namelist attribute.
See Also:
ATTRIBUTE_NAMELIST, setNameList(TokenList)

getNameListObject

public TokenList getNameListObject()
Retrieve the namelist attribute as a list object.

Returns:
Value of the namelist attribute as a list.
See Also:
getNamelist()

setNameList

public void setNameList(TokenList list)
Set the namelist attribute.

Parameters:
list - Value of the namelist attribute.
See Also:
ATTRIBUTE_NAMELIST, setNamelist(String)

getMethodName

public String getMethodName()
Retrieve the method attribute.

Returns:
Value of the method attribute.
See Also:
ATTRIBUTE_METHOD

getMethod

public RequestMethod getMethod()
Retrieve the method attribute.

Returns:
Value of the method attribute.
Since:
0.7
See Also:
ATTRIBUTE_METHOD

setMethodName

public void setMethodName(String method)
Set the method attribute.

Parameters:
method - Value of the method attribute.
See Also:
ATTRIBUTE_METHOD

setMethod

public void setMethod(RequestMethod method)
Set the method attribute.

Parameters:
method - Value of the method attribute.
Since:
0.7
See Also:
ATTRIBUTE_METHOD

getEnctype

public String getEnctype()
Retrieve the enctype attribute.

Returns:
Value of the enctype attribute.
See Also:
ATTRIBUTE_ENCTYPE

setEnctype

public void setEnctype(String enctype)
Set the enctype attribute.

Parameters:
enctype - Value of the enctype attribute.
See Also:
ATTRIBUTE_ENCTYPE

getFetchaudio

public String getFetchaudio()
Retrieve the fetchaudio attribute.

Returns:
Value of the fetchaudio attribute.
See Also:
ATTRIBUTE_FETCHAUDIO

setFetchaudio

public void setFetchaudio(String fetchaudio)
Set the fetchaudio attribute.

Parameters:
fetchaudio - Value of the fetchaudio attribute.
See Also:
ATTRIBUTE_FETCHAUDIO

getFetchhint

public String getFetchhint()
Retrieve the fetchhint attribute.

Returns:
Value of the fetchhint attribute.
See Also:
ATTRIBUTE_FETCHHINT

setFetchhint

public void setFetchhint(String fetchhint)
Set the fetchhint attribute.

Parameters:
fetchhint - Value of the fetchhint attribute.
See Also:
ATTRIBUTE_FETCHHINT

getFetchtimeout

public String getFetchtimeout()
Retrieve the fetchtimeout attribute.

Returns:
Value of the fetchtimeout attribute.
See Also:
ATTRIBUTE_FETCHTIMEOUT

setFetchtimeout

public void setFetchtimeout(String fetchtimeout)
Set the fetchtimeout attribute.

Parameters:
fetchtimeout - Value of the fetchtimeout attribute.
See Also:
ATTRIBUTE_FETCHTIMEOUT

getMaxage

public String getMaxage()
Retrieve the maxage attribute.

Returns:
Value of the maxage attribute.
See Also:
ATTRIBUTE_MAXAGE

setMaxage

public void setMaxage(String maxage)
Set the maxage attribute.

Parameters:
maxage - Value of the maxage attribute.
See Also:
ATTRIBUTE_MAXAGE

getMaxstale

public String getMaxstale()
Retrieve the maxstale attribute.

Returns:
Value of the maxstale attribute.
See Also:
ATTRIBUTE_MAXSTALE

setMaxstale

public void setMaxstale(String maxstale)
Set the maxstale attribute.

Parameters:
maxstale - Value of the maxstale attribute.
See Also:
ATTRIBUTE_MAXSTALE

canContainChild

protected boolean canContainChild(String tagName)
Can the specified sub-tag be contained within this node?

Specified by:
canContainChild in class AbstractXmlNode
Parameters:
tagName - Name of child.
Returns:
True if the sub-tag is allowed on this node.

getAttributeNames

public Collection<String> getAttributeNames()
Returns a collection of permitted attribute names for the node.

Specified by:
getAttributeNames in interface XmlNode
Overrides:
getAttributeNames in class AbstractXmlNode
Returns:
A collection of attribute names that are allowed for the node


Copyright © 2005-2009JVoiceXML group.