Class PromptElement

java.lang.Object
com.uc4.api.objects.PromptElement
Direct Known Subclasses:
DateElement, LabelElement, NumberElement, OnChangeResetElement, RadioGroupElement, TimeElement

public abstract class PromptElement extends Object
Basis class of all prompt elements.
  • Field Details

  • Constructor Details

    • PromptElement

      public PromptElement()
  • Method Details

    • getTooltip

      public String getTooltip()
      Returns the tooltip of this Prompt Element.
      Returns:
      Tooltip
    • setTooltip

      public void setTooltip(String tooltip)
      Sets the tooltip of this Prompt Element.
      Parameters:
      tooltip - Tooltip text
    • getCustomField

      public String getCustomField()
      Returns the custom field of this Prompt Element.
      Returns:
      Custom field
    • setCustomField

      public void setCustomField(String customField)
      Sets the custom field of this Prompt Element.
      Parameters:
      customField - Custom field
    • getVariable

      public 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(String value)
      Sets the default value of this prompt element.
      Parameters:
      value - Default value
    • setRawValue

      public void setRawValue(String value)
      Sets the value of this prompt element (ignoring validation and encryption, setting the raw value)
      Parameters:
      value - new value
    • validateForExecute

      protected void validateForExecute(String v)
      Sub classes implement this method
      Parameters:
      v - Value
    • setValues

      public void setValues(String[] values)
      Sets the list of values if the "Array" property is set.
      Parameters:
      values - Array of Strings containing the values
    • getValues

      public String[] getValues()
      Returns the list of values if the "Array" property is set.
      Returns:
      Array of Strings containing the values
    • getValue

      public String getValue()
      Returns the default value of this prompt element.
      Returns:
      Default value
    • setVariable

      public void setVariable(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(String idParameter)
    • store

      protected void store(com.uc4.util.XMLDocument xmlDocument, Element readpanel)
      Saves this PromptElement to the specified XML Document
      Parameters:
      xmlDocument - XML Document
      readpanel - Read Panel
    • storeAdditionalPromptData

      protected void storeAdditionalPromptData(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 String listParam()
    • storeDefaultValues

      protected void storeDefaultValues(com.uc4.util.XMLDocument xmlDocument, Element box)
    • hasList

      public boolean hasList()
      Returns true if the prompt element contains a list of values.
      Returns:
      Has list?
    • getProperty

      public String getProperty(String name)
      Returns the value of a property by its name. The following names can be used:
      • tooltip
      • enabled
      • id
      Sub class may add additional properties, for example "required", "focus", "upper".
      Parameters:
      name - Name of the property
      Returns:
      Value or null if not found
    • updateDefaultValue

      public void updateDefaultValue(Element element)
      Internal use.
      Parameters:
      element - DOM element
    • getTagName

      protected abstract String getTagName()
    • getMode

      protected String getMode()
    • toString

      public String toString()
      Overrides:
      toString in class 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 String getMessageInsert()
      This method returns a message insert for the message number returned by getMessageNumber.
      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.