Class InputEditActionServiceImpl
java.lang.Object
ch.tocco.nice2.optional.qualification.impl.action.InputEditActionServiceImpl
- All Implemented Interfaces:
InputEditActionService
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.optional.qualification.impl.action.InputEditActionService
InputEditActionService.ChoiceRatingValue, InputEditActionService.ExamEditorFormData, InputEditActionService.FinishedResponse, InputEditActionService.FormInfo, InputEditActionService.MasterData, InputEditActionService.ServerFeedback
-
Constructor Summary
ConstructorDescriptionInputEditActionServiceImpl
(EntityExplorerActionSelectionService entityExplorerActionSelectionService, QualificationService qualificationService, Context context, DefaultDisplayService defaultDisplayService, PersistPermissionService permissionService, SecurityManager securityManager, BusinessUnitManager businessUnitManager, org.slf4j.Logger log, L10N l10N, EvaluationTaskProvider taskProvider, CommandExecutor executor, QueryBuilderFactory queryBuilderFactory, QualificationBeanFactory qualificationBeanFactory, InputEditValidationService inputEditValidationService, ExamService examService) -
Method Summary
Modifier and TypeMethodDescription@Nullable String
checks if a selection can be used together to input data, things compared are number of ratings active exams input nodesfinishInput
(EntityExplorerActionSelection selectedInput) getActiveExams
(EntityExplorerActionSelection selection) getExams
(EntityExplorerActionSelection selection) Returns allExam
s related to the selectedInput
even if they are defined as inactive by theirExam.FIELD_NR
exceeding theInput
'snumRatings
value.getExamsWithLimit
(EntityExplorerActionSelection selection, int limit) Returns allExam
s related to the selectedInput
not exceeding the given limit, even if they are defined as inactive by theirExam.FIELD_NR
exceeding theInput
'snumRatings
value.getFormInfo
(EntityExplorerActionSelection selection) getInputData
(EntityExplorerActionSelection inputSelection) getLocalizedFormInfo
(EntityExplorerActionSelection selectedInput, Locale locale) getLocalizedInputData
(Entity inputEntity, Locale locale) getMasterData
(EntityExplorerActionSelection selection) getStatistics
(EntityExplorerActionSelection selection) boolean
isEvaluationAllowed
(EntityExplorerActionSelection selection) checks if any evaluation going upwards has been published.void
triggerEvaluation
(EntityExplorerActionSelection selection) start the evaluation of an evaluation entity by runningEvaluationTask
on itvoid
updateExams
(EntityExplorerActionSelection selection, AbstractInputType.ExamRecord[] examRecords) writeInboundRecord
(EntityExplorerActionSelection selection, AbstractInputType.InboundInputDataRecord inboundInputDataRecord) writeInboundRecord
(EntityExplorerActionSelection selection, AbstractInputType.InboundRatingRecord inboundRatingRecord)
-
Constructor Details
-
InputEditActionServiceImpl
public InputEditActionServiceImpl(EntityExplorerActionSelectionService entityExplorerActionSelectionService, QualificationService qualificationService, Context context, DefaultDisplayService defaultDisplayService, PersistPermissionService permissionService, SecurityManager securityManager, BusinessUnitManager businessUnitManager, org.slf4j.Logger log, L10N l10N, EvaluationTaskProvider taskProvider, CommandExecutor executor, QueryBuilderFactory queryBuilderFactory, QualificationBeanFactory qualificationBeanFactory, InputEditValidationService inputEditValidationService, ExamService examService)
-
-
Method Details
-
areInputsCompatibleForEdit
@Nullable public @Nullable String areInputsCompatibleForEdit(EntityExplorerActionSelection selection) Description copied from interface:InputEditActionService
checks if a selection can be used together to input data, things compared are- number of ratings
- active exams
- input nodes
- Specified by:
areInputsCompatibleForEdit
in interfaceInputEditActionService
- Parameters:
selection
- the selection- Returns:
- String the validation message, or null if valid
-
getFormInfo
- Specified by:
getFormInfo
in interfaceInputEditActionService
-
getLocalizedFormInfo
public InputEditActionService.FormInfo getLocalizedFormInfo(EntityExplorerActionSelection selectedInput, Locale locale) - Specified by:
getLocalizedFormInfo
in interfaceInputEditActionService
-
getInputData
- Specified by:
getInputData
in interfaceInputEditActionService
-
getLocalizedInputData
- Specified by:
getLocalizedInputData
in interfaceInputEditActionService
-
writeInboundRecord
public InputEditActionService.ServerFeedback writeInboundRecord(EntityExplorerActionSelection selection, AbstractInputType.InboundInputDataRecord inboundInputDataRecord) - Specified by:
writeInboundRecord
in interfaceInputEditActionService
-
writeInboundRecord
public InputEditActionService.ServerFeedback writeInboundRecord(EntityExplorerActionSelection selection, AbstractInputType.InboundRatingRecord inboundRatingRecord) - Specified by:
writeInboundRecord
in interfaceInputEditActionService
-
getMasterData
- Specified by:
getMasterData
in interfaceInputEditActionService
-
getStatistics
- Specified by:
getStatistics
in interfaceInputEditActionService
-
getActiveExams
Description copied from interface:InputEditActionService
- Specified by:
getActiveExams
in interfaceInputEditActionService
- Parameters:
selection
- the editedInput
- Returns:
- a list of records containing the
Exam
's information - See Also:
-
getExams
Description copied from interface:InputEditActionService
Returns allExam
s related to the selectedInput
even if they are defined as inactive by theirExam.FIELD_NR
exceeding theInput
'snumRatings
value.- Specified by:
getExams
in interfaceInputEditActionService
- Parameters:
selection
- the selectedInput
- Returns:
- a list of records containing the
Exam
's information
-
getExamsWithLimit
public List<AbstractInputType.ExamRecord> getExamsWithLimit(EntityExplorerActionSelection selection, int limit) Description copied from interface:InputEditActionService
Returns allExam
s related to the selectedInput
not exceeding the given limit, even if they are defined as inactive by theirExam.FIELD_NR
exceeding theInput
'snumRatings
value.- Specified by:
getExamsWithLimit
in interfaceInputEditActionService
- Parameters:
selection
- the selectedInput
limit
- the limit of exams to get for theInput
- Returns:
- a list of records containing the
Exam
's information - See Also:
-
updateExams
public void updateExams(EntityExplorerActionSelection selection, AbstractInputType.ExamRecord[] examRecords) Description copied from interface:InputEditActionService
- Specified by:
updateExams
in interfaceInputEditActionService
- Parameters:
selection
- the editedInput
examRecords
- the records holding theExam
's information- See Also:
-
finishInput
public InputEditActionService.FinishedResponse finishInput(EntityExplorerActionSelection selectedInput) - Specified by:
finishInput
in interfaceInputEditActionService
-
getExamsEditorFormData
public InputEditActionService.ExamEditorFormData getExamsEditorFormData(EntityExplorerActionSelection selection) - Specified by:
getExamsEditorFormData
in interfaceInputEditActionService
-
triggerEvaluation
Description copied from interface:InputEditActionService
start the evaluation of an evaluation entity by runningEvaluationTask
on it- Specified by:
triggerEvaluation
in interfaceInputEditActionService
- Parameters:
selection
- the selected entity
-
isEvaluationAllowed
Description copied from interface:InputEditActionService
checks if any evaluation going upwards has been published. only published evaluations are allowed to be evaluated- Specified by:
isEvaluationAllowed
in interfaceInputEditActionService
- Parameters:
selection
- the selected entity- Returns:
- true if the evaluation should be allowed, meaning the button will be shown, false otherwise
-