Class Rule
java.lang.Object
org.ametys.plugins.forms.repository.type.Rule
Object representing a rule
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRule
(String id, String option, Rule.QuestionRuleType type) The Rule constructor -
Method Summary
Modifier and TypeMethodDescriptionGet the action on the target when triggeredGet the option value that trigger the actionGet the source question's idvoid
Set the Question Rule typevoid
Set the option value that trigger the actionvoid
setSourceId
(String questionId) Set the source question's idtoJson()
Get the rule attributes formated for json export
-
Constructor Details
-
Rule
The Rule constructor- Parameters:
id
- the source question's idoption
- the trigger option's valuetype
- the action on the target when triggered
-
-
Method Details
-
getSourceId
Get the source question's id- Returns:
- the question's id
-
setSourceId
Set the source question's id- Parameters:
questionId
- the question's id
-
getAction
Get the action on the target when triggered- Returns:
- the Rule's action
-
setAction
Set the Question Rule type- Parameters:
type
- the type of _action to set
-
getOption
Get the option value that trigger the action- Returns:
- the _option
-
setOption
Set the option value that trigger the action- Parameters:
option
- the _option to set
-
toJson
Get the rule attributes formated for json export- Returns:
- a json readable map
-