Package com.uc4.api.objects
Class PromptDesigner
- java.lang.Object
-
- com.uc4.api.objects.PromptDesigner
-
- All Implemented Interfaces:
java.lang.Iterable<PromptElement>
public class PromptDesigner extends java.lang.Object implements java.lang.Iterable<PromptElement>
This class is used to design Prompt Elements.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PromptDesigner(com.uc4.util.XMLDocument doc)
Parses the XMLDocument and extracts all prompt elements.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, PromptElement element)
Inserts the PromptElement at the specified position.void
add(PromptElement element)
Adds a new PromptElement at the end of this PromptSet.void
clear()
Removes all PromptElements from this PromptSet.java.lang.String
getCaption()
Returns the caption of this PromptSet.java.util.Iterator<PromptElement>
iterator()
Returns anjava.util.Iterator
which can used to read PromptElements of this PromptSet.void
setCaption(java.lang.String caption)
Sets the caption of this PromptSet.int
size()
Returns the number of prompt elements in this PromptSet.protected void
store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element objectElement, ConnectionAttributes sessionInfo, java.lang.String idnr)
static java.lang.String
toString(org.w3c.dom.Document doc)
Returns the given document as a string.
-
-
-
Constructor Detail
-
PromptDesigner
protected PromptDesigner(com.uc4.util.XMLDocument doc)
Parses the XMLDocument and extracts all prompt elements. If there is a parser error the excpetion will be saved and thrown as RuntimeExcpetion in each public method of this class.- Parameters:
doc
- XML document
-
-
Method Detail
-
size
public int size()
Returns the number of prompt elements in this PromptSet. The return value is-1
if the request has not been sent.- Returns:
- Number of prompt elements
-
iterator
public java.util.Iterator<PromptElement> iterator()
Returns anjava.util.Iterator
which can used to read PromptElements of this PromptSet. The remove() method of the Iterator can be used to remove elements.- Specified by:
iterator
in interfacejava.lang.Iterable<PromptElement>
- Returns:
- Iterator
-
clear
public void clear()
Removes all PromptElements from this PromptSet.
-
add
public void add(PromptElement element)
Adds a new PromptElement at the end of this PromptSet.- Parameters:
element
- PromptElement
-
add
public void add(int index, PromptElement element)
Inserts the PromptElement at the specified position.- Parameters:
index
- Indexelement
- PromptElement
-
getCaption
public java.lang.String getCaption()
Returns the caption of this PromptSet.- Returns:
- Caption of the PromptSet
-
setCaption
public void setCaption(java.lang.String caption)
Sets the caption of this PromptSet.- Parameters:
caption
- Caption
-
store
protected void store(com.uc4.util.XMLDocument doc, org.w3c.dom.Element objectElement, ConnectionAttributes sessionInfo, java.lang.String idnr)
-
toString
public static java.lang.String toString(org.w3c.dom.Document doc)
Returns the given document as a string. transformer is created and not reused- Parameters:
doc
- the xml document- Returns:
-
-