Class AnswerEventQuestionActionServiceImpl
java.lang.Object
ch.tocco.nice2.optional.event.impl.actions.AnswerEventQuestionActionServiceImpl
- All Implemented Interfaces:
AnswerEventQuestionActionService
public class AnswerEventQuestionActionServiceImpl
extends Object
implements AnswerEventQuestionActionService
-
Constructor Summary
ConstructorDescriptionAnswerEventQuestionActionServiceImpl
(EntityExplorerActionSelectionService selectionService, Context context, QueryBuilderFactory queryBuilderFactory, EventQuestionService eventQuestionService) -
Method Summary
Modifier and TypeMethodDescriptiongetStore
(EntityExplorerActionSelection selection) Returns allEvent_question_answers
s from the related event.void
saveAnswers
(EntityExplorerActionSelection selection, Map<String, String> questionValues) Saves all theEvent_question_answers
s.
-
Constructor Details
-
AnswerEventQuestionActionServiceImpl
public AnswerEventQuestionActionServiceImpl(EntityExplorerActionSelectionService selectionService, Context context, QueryBuilderFactory queryBuilderFactory, EventQuestionService eventQuestionService)
-
-
Method Details
-
getStore
Description copied from interface:AnswerEventQuestionActionService
Returns allEvent_question_answers
s from the related event. If the registration already has some relatedEvent_question_answer
s, it sets these. How this is done depends on theEvent_question_type
. If it is a choice question (Multiple choice, Single choice) the flagselected
on the BeanRegistrationAnswerOption
will be set. If the question is of the type text, the propertyanswer
on the Bean will be set.- Specified by:
getStore
in interfaceAnswerEventQuestionActionService
- Parameters:
selection
- the selectedRegistration
- Returns:
- the questions of the related event with preselected values if existing
-
saveAnswers
Description copied from interface:AnswerEventQuestionActionService
Saves all theEvent_question_answers
s. If an answer was selected before and is not selected anymore now, the existing answer will be removed.- Specified by:
saveAnswers
in interfaceAnswerEventQuestionActionService
- Parameters:
selection
- the selectedRegistration
questionValues
- the answers with its values
-