Package org.ametys.plugins.forms.helper
Class QuestionRuleHelper
java.lang.Object
org.ametys.plugins.forms.helper.QuestionRuleHelper
- All Implemented Interfaces:
Component
,Serviceable
Helper for getting rules properties
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet the actions available to apply to this questiongetSourceOptions
(String questionId) Get all the available options for the selected questiongetSourceQuestions
(String formId, String questionId) Get all choices list and booleans questions as source for the rulevoid
service
(ServiceManager manager)
-
Field Details
-
_resolver
The Ametys object resolver
-
-
Constructor Details
-
QuestionRuleHelper
public QuestionRuleHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getSourceQuestions
Get all choices list and booleans questions as source for the rule- Parameters:
formId
- id of the current formquestionId
- id of the current question- Returns:
- a map containing the list of questions
-
getSourceOptions
Get all the available options for the selected question- Parameters:
questionId
- id of the selected question- Returns:
- a map containing the list of all the options as map (label for display and unique value)
-
getRuleActions
Get the actions available to apply to this question- Returns:
- a list of actions (currently hide or show)
-