Package com.uc4.api.objects
Class PromptSetDefinition
java.lang.Object
com.uc4.api.objects.PromptSetDefinition
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 ClassesModifier and TypeClassDescriptionstatic enum
Enum for all the various tables where prompt values can be stored -
Constructor Summary
ConstructorsConstructorDescriptionPromptSetDefinition
(PromptSetDefinition promptSetDefinition) This constructor is required for creating a copy of the PromptSetDefinition.Internal use. -
Method Summary
Modifier and TypeMethodDescriptionboolean
String[]
Returns an array of Prompt element IDs.getId()
getName()
getReadFromTable
(String elementID) Returns the table the value is currently stored ingetReadFromTableName
(String elementID) Returns the raw string name of the table the value is currently stored inReturns the value of the specified ID.String[]
Returns the values of the specified ID.boolean
hasAlternativeView
(String elementID) Returnstrue
if the value of the specified prompt element is shown in an alternative view.int
hashCode()
boolean
Returns true if the the specified ID contains an array of values otherwise false.boolean
Is the given element dirty (changed by user before saving)void
resetPromptValue
(String elementID) Sets values of the element to use the default.void
setAlternativeValue
(String elementID, String value) Sets a value for the specified prompt element.void
setPasswordValue
(String elementID, String value) Sets a value for the specified prompt element and encrypts it.void
setReadFromTable
(String elementID, PromptSetDefinition.PromptElementTable table) void
Sets a value for the specified prompt element.void
Sets values as an array for the specified prompt element.protected void
-
Constructor Details
-
PromptSetDefinition
Internal use.- Parameters:
doc
- XML document
-
PromptSetDefinition
This constructor is required for creating a copy of the PromptSetDefinition.- Parameters:
promptSetDefinition
-PromptSetDefinition
-
-
Method Details
-
getName
- Returns:
- Name of the PromptSet object
-
getId
- Returns:
- ID of the PromptSet object
-
getElementIDs
Returns an array of Prompt element IDs.- Returns:
- Array of IDs
-
setValue
Sets a value for the specified prompt element.- Parameters:
elementID
- ID of the elementvalue
- Value
-
setPasswordValue
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 elementvalue
- Value
-
setAlternativeValue
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 thegetValue()
method to read the result back.- Parameters:
elementID
- ID of the elementvalue
- Value
-
setValues
Sets values as an array for the specified prompt element.- Parameters:
elementID
- ID of the elementvalues
- Array of values
-
resetPromptValue
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
-
getReadFromTable
Returns the table the value is currently stored in- Parameters:
elementID
- ID of the element- Returns:
- the
PromptSetDefinition.PromptElementTable
of the table the value is read from, or null if none found - Throws:
IllegalArgumentException
- if the value is not registered in thePromptSetDefinition.PromptElementTable
enum.
-
setReadFromTable
-
getReadFromTableName
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:
NullPointerException
- in case the element is not contained
-
hasAlternativeView
Returnstrue
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
Returns the value of the specified ID.- Parameters:
elementID
- ID of the element- Returns:
- Value
-
getValues
Returns the values of the specified ID.- Parameters:
elementID
- ID of the element- Returns:
- Array of values
-
hasList
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
-
hashCode
public int hashCode() -
equals
-
isDirty
Is the given element dirty (changed by user before saving)
-