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.Object
Basis class of all prompt elements.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.String>
aliasMap
protected java.util.List<java.lang.String>
list
protected 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.String
getCustomField()
Returns the custom field of this Prompt Element.java.lang.String
getMessageInsert()
This method returns a message insert for the message number returned bygetMessageNumber
.int
getMessageNumber()
This method returns a message number in case a Prompt is executed but its value is not valid.protected java.lang.String
getMode()
java.lang.String
getProperty(java.lang.String name)
Returns the value of a property by its name.protected abstract java.lang.String
getTagName()
java.lang.String
getTooltip()
Returns the tooltip of this Prompt Element.java.lang.String
getValue()
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.String
getVariable()
Returns the variable name that can be used in the Automation Engine Script.boolean
hasList()
Returnstrue
if the prompt element contains a list of values.boolean
isAltView()
Is this prompt using a variable as default value.protected boolean
isLocked()
protected java.lang.String
listParam()
void
setAltView(boolean altview)
Is this prompt using a variable as default valuevoid
setCustomField(java.lang.String customField)
Sets the custom field of this Prompt Element.protected void
setLocked(boolean locked)
void
setTooltip(java.lang.String tooltip)
Sets the tooltip of this Prompt Element.void
setValue(java.lang.String value)
Sets the default value of this prompt element.void
setValues(java.lang.String[] values)
Sets the list of values if the "Array" property is set.void
setVariable(java.lang.String variable)
Sets the variable name that can be used in the Automation Engine Script.protected void
store(com.uc4.util.XMLDocument xmlDocument, org.w3c.dom.Element readpanel)
Saves this PromptElement to the specified XML Documentprotected void
storeAdditionalPromptData(org.w3c.dom.Element promptElement)
Subclasses can implement this method to store additional data into the prompt-element.protected void
storeDefaultValues(com.uc4.util.XMLDocument xmlDocument, org.w3c.dom.Element box)
java.lang.String
toString()
void
updateDefaultValue(org.w3c.dom.Element element)
Internal use.protected void
validateForExecute(java.lang.String v)
Sub classes implement this methodprotected void
validateId(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()
Returnstrue
if 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:
toString
in 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
null
or 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.
-
-