Package com.uc4.api.objects
Class PromptDesigner
java.lang.Object
com.uc4.api.objects.PromptDesigner
- All Implemented Interfaces:
Iterable<PromptElement>
This class is used to design Prompt Elements.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPromptDesigner(com.uc4.util.XMLDocument doc) Parses the XMLDocument and extracts all prompt elements. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int index, PromptElement element) Inserts the PromptElement at the specified position.voidadd(PromptElement element) Adds a new PromptElement at the end of this PromptSet.voidclear()Removes all PromptElements from this PromptSet.Returns the caption of this PromptSet.iterator()Returns anjava.util.Iteratorwhich can used to read PromptElements of this PromptSet.voidsetCaption(String caption) Sets the caption of this PromptSet.intsize()Returns the number of prompt elements in this PromptSet.protected voidstore(com.uc4.util.XMLDocument doc, Element objectElement, ConnectionAttributes sessionInfo, String idnr) static StringReturns the given document as a string.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
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 Details
-
size
public int size()Returns the number of prompt elements in this PromptSet. The return value is-1if the request has not been sent.- Returns:
- Number of prompt elements
-
iterator
Returns anjava.util.Iteratorwhich can used to read PromptElements of this PromptSet. The remove() method of the Iterator can be used to remove elements.- Specified by:
iteratorin interfaceIterable<PromptElement>- Returns:
- Iterator
-
clear
public void clear()Removes all PromptElements from this PromptSet. -
add
Adds a new PromptElement at the end of this PromptSet.- Parameters:
element- PromptElement
-
add
Inserts the PromptElement at the specified position.- Parameters:
index- Indexelement- PromptElement
-
getCaption
Returns the caption of this PromptSet.- Returns:
- Caption of the PromptSet
-
setCaption
Sets the caption of this PromptSet.- Parameters:
caption- Caption
-
store
protected void store(com.uc4.util.XMLDocument doc, Element objectElement, ConnectionAttributes sessionInfo, String idnr) -
toString
Returns the given document as a string. transformer is created and not reused- Parameters:
doc- the xml document- Returns:
-