Package com.uc4.api.objects
Class PromptElement
java.lang.Object
com.uc4.api.objects.PromptElement
- Direct Known Subclasses:
DateElement
,LabelElement
,NumberElement
,OnChangeResetElement
,RadioGroupElement
,TimeElement
Basis class of all prompt elements.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the custom field of this Prompt Element.This method returns a message insert for the message number returned bygetMessageNumber
.int
This method returns a message number in case a Prompt is executed but its value is not valid.protected String
getMode()
getProperty
(String name) Returns the value of a property by its name.protected abstract String
Returns the tooltip of this Prompt Element.getValue()
Returns the default value of this prompt element.String[]
Returns the list of values if the "Array" property is set.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
Is this prompt using a variable as default value.protected boolean
isLocked()
protected String
void
setAltView
(boolean altview) Is this prompt using a variable as default valuevoid
setCustomField
(String customField) Sets the custom field of this Prompt Element.protected void
setLocked
(boolean locked) void
setRawValue
(String value) Sets the value of this prompt element (ignoring validation and encryption, setting the raw value)void
setTooltip
(String tooltip) Sets the tooltip of this Prompt Element.void
Sets the default value of this prompt element.void
Sets the list of values if the "Array" property is set.void
setVariable
(String variable) Sets the variable name that can be used in the Automation Engine Script.protected void
Saves this PromptElement to the specified XML Documentprotected void
storeAdditionalPromptData
(Element promptElement) Subclasses can implement this method to store additional data into the prompt-element.protected void
storeDefaultValues
(com.uc4.util.XMLDocument xmlDocument, Element box) toString()
void
updateDefaultValue
(Element element) Internal use.protected void
Sub classes implement this methodprotected void
validateId
(String idParameter)
-
Field Details
-
properties
-
list
-
aliasMap
-
-
Constructor Details
-
PromptElement
public PromptElement()
-
-
Method Details
-
getTooltip
Returns the tooltip of this Prompt Element.- Returns:
- Tooltip
-
setTooltip
Sets the tooltip of this Prompt Element.- Parameters:
tooltip
- Tooltip text
-
getCustomField
Returns the custom field of this Prompt Element.- Returns:
- Custom field
-
setCustomField
Sets the custom field of this Prompt Element.- Parameters:
customField
- Custom field
-
getVariable
Returns the variable name that can be used in the Automation Engine Script.- Returns:
- Name of the Script variable
-
setValue
Sets the default value of this prompt element.- Parameters:
value
- Default value
-
setRawValue
Sets the value of this prompt element (ignoring validation and encryption, setting the raw value)- Parameters:
value
- new value
-
validateForExecute
Sub classes implement this method- Parameters:
v
- Value
-
setValues
Sets the list of values if the "Array" property is set.- Parameters:
values
- Array of Strings containing the values
-
getValues
Returns the list of values if the "Array" property is set.- Returns:
- Array of Strings containing the values
-
getValue
Returns the default value of this prompt element.- Returns:
- Default value
-
setVariable
Sets the variable name that can be used in the Automation Engine Script.- Parameters:
variable
- Name of the Script variable
-
validateId
-
store
Saves this PromptElement to the specified XML Document- Parameters:
xmlDocument
- XML Documentreadpanel
- Read Panel
-
storeAdditionalPromptData
Subclasses can implement this method to store additional data into the prompt-element.- Parameters:
promptElement
- xml-element from the prompt-element
-
listParam
-
storeDefaultValues
-
hasList
public boolean hasList()Returnstrue
if the prompt element contains a list of values.- Returns:
- Has list?
-
getProperty
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
Internal use.- Parameters:
element
- DOM element
-
getTagName
-
getMode
-
toString
-
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
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.
-