Constructor and Description |
---|
Prompt() |
Modifier and Type | Method and Description |
---|---|
void |
addCondition(Condition condition)
Adds a condition to this prompt.
|
void |
addPreconditions(Conditions preconditions)
Adds preconditions to this prompt.
|
void |
addResponse(String response)
Adds a response to the possible responses.
|
List<Condition> |
getConditions()
Gets the conditions defined in this prompt.
|
String |
getId()
Gets the unique id of this prompt.
|
List<Conditions> |
getPreconditions()
Gets the preconditions for this prompt.
|
Object |
getResponse(Object response)
Gets the response object converted to the appropriate
type or just as it is (if no conversion took place or conversion
failed).
|
String |
getText()
Gets the text of the prompt.
|
boolean |
isRequired()
Indicates whether or not this prompt is required.
|
boolean |
isSetResponseAsTrue()
Whether or not the response should be set to a boolean value of
true . |
boolean |
isValidResponse(String response)
Indicates whether or not the given
response is valid
according to the valid responses contained in this prompt instance. |
void |
setId(String id)
Sets the unique id of this prompt.
|
void |
setRequired(boolean required)
Sets whether or not this prompt is required,
by default the prompt is required.
|
void |
setResponseType(String responseType)
Sets the response type to use (i.e the fully qualified name of the
type to which it should be converted when placed into the the template context).
|
void |
setSetResponseAsTrue(boolean setResponseAsBoolean)
Sets whether or not the response should be set to a boolean value of true.
|
void |
setText(String text)
Sets the prompt text.
|
public Prompt()
public void setId(String id)
id
- The id to set.public void setRequired(boolean required)
required
- whether or not this prompt is requiredpublic boolean isRequired()
public void addResponse(String response)
response
- the response to add.public boolean isValidResponse(String response)
response
is valid
according to the valid responses contained in this prompt instance.response
- the response to check.public Object getResponse(Object response)
response
- the response to convert.public void setResponseType(String responseType)
responseType
- the fully qualified response type name.public void addCondition(Condition condition)
condition
- the condition which must apply to this prompt.public List<Condition> getConditions()
public void addPreconditions(Conditions preconditions)
preconditions
- the preconditions to add.public List<Conditions> getPreconditions()
public boolean isSetResponseAsTrue()
true
.public void setSetResponseAsTrue(boolean setResponseAsBoolean)
setResponseAsBoolean
- The setResponseAsTrue to set.Copyright © 2005–2014 AndroMDA.org. All rights reserved.