Package com.uc4.api.objects
Class PromptElement
- java.lang.Object
-
- com.uc4.api.objects.PromptElement
-
- Direct Known Subclasses:
DateElement,LabelElement,NumberElement,OnChangeResetElement,RadioGroupElement,TimeElement
public abstract class PromptElement extends java.lang.ObjectBasis class of all prompt elements.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.String>aliasMapprotected java.util.List<java.lang.String>listprotected java.util.Map<java.lang.String,java.lang.String>properties
-
Constructor Summary
Constructors Constructor Description PromptElement()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCustomField()Returns the custom field of this Prompt Element.java.lang.StringgetMessageInsert()This method returns a message insert for the message number returned bygetMessageNumber.intgetMessageNumber()This method returns a message number in case a Prompt is executed but its value is not valid.protected java.lang.StringgetMode()java.lang.StringgetProperty(java.lang.String name)Returns the value of a property by its name.protected abstract java.lang.StringgetTagName()java.lang.StringgetTooltip()Returns the tooltip of this Prompt Element.java.lang.StringgetValue()Returns the default value of this prompt element.java.lang.String[]getValues()Returns the list of values if the "Array" property is set.java.lang.StringgetVariable()Returns the variable name that can be used in the Automation Engine Script.booleanhasList()Returnstrueif the prompt element contains a list of values.booleanisAltView()Is this prompt using a variable as default value.protected booleanisLocked()protected java.lang.StringlistParam()voidsetAltView(boolean altview)Is this prompt using a variable as default valuevoidsetCustomField(java.lang.String customField)Sets the custom field of this Prompt Element.protected voidsetLocked(boolean locked)voidsetTooltip(java.lang.String tooltip)Sets the tooltip of this Prompt Element.voidsetValue(java.lang.String value)Sets the default value of this prompt element.voidsetValues(java.lang.String[] values)Sets the list of values if the "Array" property is set.voidsetVariable(java.lang.String variable)Sets the variable name that can be used in the Automation Engine Script.protected voidstore(com.uc4.util.XMLDocument xmlDocument, org.w3c.dom.Element readpanel)Saves this PromptElement to the specified XML Documentprotected voidstoreAdditionalPromptData(org.w3c.dom.Element promptElement)Subclasses can implement this method to store additional data into the prompt-element.protected voidstoreDefaultValues(com.uc4.util.XMLDocument xmlDocument, org.w3c.dom.Element box)java.lang.StringtoString()voidupdateDefaultValue(org.w3c.dom.Element element)Internal use.protected voidvalidateForExecute(java.lang.String v)Sub classes implement this methodprotected voidvalidateId(java.lang.String idParameter)
-
-
-
Method Detail
-
getTooltip
public java.lang.String getTooltip()
Returns the tooltip of this Prompt Element.- Returns:
- Tooltip
-
setTooltip
public void setTooltip(java.lang.String tooltip)
Sets the tooltip of this Prompt Element.- Parameters:
tooltip- Tooltip text
-
getCustomField
public java.lang.String getCustomField()
Returns the custom field of this Prompt Element.- Returns:
- Custom field
-
setCustomField
public void setCustomField(java.lang.String customField)
Sets the custom field of this Prompt Element.- Parameters:
customField- Custom field
-
getVariable
public java.lang.String getVariable()
Returns the variable name that can be used in the Automation Engine Script.- Returns:
- Name of the Script variable
-
setValue
public void setValue(java.lang.String value)
Sets the default value of this prompt element.- Parameters:
value- Default value
-
validateForExecute
protected void validateForExecute(java.lang.String v)
Sub classes implement this method- Parameters:
v- Value
-
setValues
public void setValues(java.lang.String[] values)
Sets the list of values if the "Array" property is set.- Parameters:
values- Array of Strings containing the values
-
getValues
public java.lang.String[] getValues()
Returns the list of values if the "Array" property is set.- Returns:
- Array of Strings containing the values
-
getValue
public java.lang.String getValue()
Returns the default value of this prompt element.- Returns:
- Default value
-
setVariable
public void setVariable(java.lang.String variable)
Sets the variable name that can be used in the Automation Engine Script.- Parameters:
variable- Name of the Script variable
-
validateId
protected void validateId(java.lang.String idParameter)
-
store
protected void store(com.uc4.util.XMLDocument xmlDocument, org.w3c.dom.Element readpanel)Saves this PromptElement to the specified XML Document- Parameters:
xmlDocument- XML Documentreadpanel- Read Panel
-
storeAdditionalPromptData
protected void storeAdditionalPromptData(org.w3c.dom.Element promptElement)
Subclasses can implement this method to store additional data into the prompt-element.- Parameters:
promptElement- xml-element from the prompt-element
-
listParam
protected java.lang.String listParam()
-
storeDefaultValues
protected void storeDefaultValues(com.uc4.util.XMLDocument xmlDocument, org.w3c.dom.Element box)
-
hasList
public boolean hasList()
Returnstrueif the prompt element contains a list of values.- Returns:
- Has list?
-
getProperty
public java.lang.String getProperty(java.lang.String name)
Returns the value of a property by its name. The following names can be used:- tooltip
- enabled
- id
- Parameters:
name- Name of the property- Returns:
- Value or null if not found
-
updateDefaultValue
public void updateDefaultValue(org.w3c.dom.Element element)
Internal use.- Parameters:
element- DOM element
-
getTagName
protected abstract java.lang.String getTagName()
-
getMode
protected java.lang.String getMode()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getMessageNumber
public int getMessageNumber()
This method returns a message number in case a Prompt is executed but its value is not valid. A return value of 0 means that there was no error.- Returns:
- Message Number
-
getMessageInsert
public java.lang.String getMessageInsert()
This method returns a message insert for the message number returned bygetMessageNumber.- Returns:
- Message Insert, can be
nullor an empty String
-
isLocked
protected boolean isLocked()
-
setLocked
protected void setLocked(boolean locked)
-
setAltView
public void setAltView(boolean altview)
Is this prompt using a variable as default value- Parameters:
altview- true to allow variables as input
-
isAltView
public boolean isAltView()
Is this prompt using a variable as default value.- Returns:
- true if alternative view is enabled.
-
-