Class PromptSetDefinition


  • public class PromptSetDefinition
    extends java.lang.Object
    This class is created using the request com.uc4.communication.AddPromptSet An instance of this class can be added to executable Objects (for example Jobs) and default values for PromptElements can be set.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  PromptSetDefinition.PromptElementTable
      Enum for all the various tables where prompt values can be stored
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String[] getElementIDs()
      Returns an array of Prompt element IDs.
      java.lang.String getId()  
      UC4ObjectName getName()  
      PromptSetDefinition.PromptElementTable getReadFromTable​(java.lang.String elementID)
      Returns the table the value is currently stored in
      java.lang.String getReadFromTableName​(java.lang.String elementID)
      Returns the raw string name of the table the value is currently stored in
      java.lang.String getValue​(java.lang.String elementID)
      Returns the value of the specified ID.
      java.lang.String[] getValues​(java.lang.String elementID)
      Returns the values of the specified ID.
      boolean hasAlternativeView​(java.lang.String elementID)
      Returns true if the value of the specified prompt element is shown in an alternative view.
      int hashCode()  
      boolean hasList​(java.lang.String elementID)
      Returns true if the the specified ID contains an array of values otherwise false.
      boolean isDirty​(java.lang.String elementID)
      Is the given element dirty (changed by user before saving)
      void resetPromptValue​(java.lang.String elementID)
      Sets values of the element to use the default.
      void setAlternativeValue​(java.lang.String elementID, java.lang.String value)
      Sets a value for the specified prompt element.
      void setPasswordValue​(java.lang.String elementID, java.lang.String value)
      Sets a value for the specified prompt element and encrypts it.
      void setReadFromTable​(java.lang.String elementID, PromptSetDefinition.PromptElementTable table)  
      void setValue​(java.lang.String elementID, java.lang.String value)
      Sets a value for the specified prompt element.
      void setValues​(java.lang.String elementID, java.lang.String[] values)
      Sets values as an array for the specified prompt element.
      protected void store​(com.uc4.util.XMLDocument doc, org.w3c.dom.Element tree)  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PromptSetDefinition

        public PromptSetDefinition​(org.w3c.dom.Element doc)
        Internal use.
        Parameters:
        doc - XML document
      • PromptSetDefinition

        public PromptSetDefinition​(PromptSetDefinition promptSetDefinition)
        This constructor is required for creating a copy of the PromptSetDefinition.
        Parameters:
        promptSetDefinition - PromptSetDefinition
    • Method Detail

      • getName

        public UC4ObjectName getName()
        Returns:
        Name of the PromptSet object
      • getId

        public java.lang.String getId()
        Returns:
        ID of the PromptSet object
      • getElementIDs

        public java.lang.String[] getElementIDs()
        Returns an array of Prompt element IDs.
        Returns:
        Array of IDs
      • setValue

        public void setValue​(java.lang.String elementID,
                             java.lang.String value)
        Sets a value for the specified prompt element.
        Parameters:
        elementID - ID of the element
        value - Value
      • setPasswordValue

        public void setPasswordValue​(java.lang.String elementID,
                                     java.lang.String value)
        Sets a value for the specified prompt element and encrypts it. This method should be used if the "Show as password" property is set.
        Parameters:
        elementID - ID of the element
        value - Value
      • setAlternativeValue

        public void setAlternativeValue​(java.lang.String elementID,
                                        java.lang.String value)
        Sets a value for the specified prompt element. It should be used if the default value of a Prompt element is a script variable. Use the getValue() method to read the result back.
        Parameters:
        elementID - ID of the element
        value - Value
      • setValues

        public void setValues​(java.lang.String elementID,
                              java.lang.String[] values)
        Sets values as an array for the specified prompt element.
        Parameters:
        elementID - ID of the element
        values - Array of values
      • resetPromptValue

        public void resetPromptValue​(java.lang.String elementID)
        Sets values of the element to use the default. will not be saved and default in parent will be used. If you need to save it, call setValue afterwards again and the value will be overwritten
        Parameters:
        elementID - ID of the element
      • getReadFromTableName

        public java.lang.String getReadFromTableName​(java.lang.String elementID)
        Returns the raw string name of the table the value is currently stored in
        Parameters:
        elementID - ID of the element
        Returns:
        the String value of the table the value is read from, or null if none was returned from backend
        Throws:
        java.lang.NullPointerException - in case the element is not contained
      • hasAlternativeView

        public boolean hasAlternativeView​(java.lang.String elementID)
        Returns true if the value of the specified prompt element is shown in an alternative view. In this case the User Interface shows a text field instead of a control corresponding to the type (check box, time control, ...) The text field can be used to enter the name of a Script variable (for example &MYVARIABLE1).
        Parameters:
        elementID - ID of the element
        Returns:
        Alternative view enabled?
      • getValue

        public java.lang.String getValue​(java.lang.String elementID)
        Returns the value of the specified ID.
        Parameters:
        elementID - ID of the element
        Returns:
        Value
      • getValues

        public java.lang.String[] getValues​(java.lang.String elementID)
        Returns the values of the specified ID.
        Parameters:
        elementID - ID of the element
        Returns:
        Array of values
      • hasList

        public boolean hasList​(java.lang.String elementID)
        Returns true if the the specified ID contains an array of values otherwise false.
        Parameters:
        elementID - the ID of the element
        Returns:
        true/false
      • store

        protected void store​(com.uc4.util.XMLDocument doc,
                             org.w3c.dom.Element tree)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • isDirty

        public boolean isDirty​(java.lang.String elementID)
        Is the given element dirty (changed by user before saving)