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
ConstructorsConstructorDescriptionAnswerEventQuestionActionServiceImpl(EntityExplorerActionSelectionService selectionService, Context context, QueryBuilderFactory queryBuilderFactory, EventQuestionService eventQuestionService) -
Method Summary
Modifier and TypeMethodDescriptiongetStore(EntityExplorerActionSelection selection) Returns allEvent_question_answerss from the related event.voidsaveAnswers(EntityExplorerActionSelection selection, Map<String, String> questionValues) Saves all theEvent_question_answerss.
-
Constructor Details
-
AnswerEventQuestionActionServiceImpl
public AnswerEventQuestionActionServiceImpl(EntityExplorerActionSelectionService selectionService, Context context, QueryBuilderFactory queryBuilderFactory, EventQuestionService eventQuestionService)
-
-
Method Details
-
getStore
Description copied from interface:AnswerEventQuestionActionServiceReturns allEvent_question_answerss from the related event. If the registration already has some relatedEvent_question_answers, it sets these. How this is done depends on theEvent_question_type. If it is a choice question (Multiple choice, Single choice) the flagselectedon the BeanRegistrationAnswerOptionwill be set. If the question is of the type text, the propertyansweron the Bean will be set.- Specified by:
getStorein interfaceAnswerEventQuestionActionService- Parameters:
selection- the selectedRegistration- Returns:
- the questions of the related event with preselected values if existing
-
saveAnswers
Description copied from interface:AnswerEventQuestionActionServiceSaves all theEvent_question_answerss. If an answer was selected before and is not selected anymore now, the existing answer will be removed.- Specified by:
saveAnswersin interfaceAnswerEventQuestionActionService- Parameters:
selection- the selectedRegistrationquestionValues- the answers with its values
-