Class QualificationEvaluationService
java.lang.Object
ch.tocco.nice2.optional.qualification.impl.services.QualificationEvaluationService
-
Constructor Summary
ConstructorsConstructorDescriptionQualificationEvaluationService(QualificationService qualificationService, Context context, EvaluationFactory evaluationFactory, CommandExecutor commandExecutor, TaskSchedulingService taskSchedulingService, ExternalQualificationService externalQualificationService, QualificationBeanFactory qualificationBeanFactory, BusinessUnitManager businessUnitManager) -
Method Summary
Modifier and TypeMethodDescriptiongetCheckedAndUpdatedEvaluations(EntityList evaluations) filters a list of evaluation to only those that can be evaluatedgetOrCreateEvaluationData(Entity evaluation, Condition registrationCondition) get existing or create missing Evaluation_data for an Evaluation and some RegistrationsgetParentEvaluationsWithoutChildren(List<Entity> evaluations) Checks if the provided list ofEvaluationentities also includes their parent.voidrunEvaluation(EntityList evaluations) voidrunEvaluationForParticipants(Iterable<Entity> evaluationData)
-
Constructor Details
-
QualificationEvaluationService
public QualificationEvaluationService(QualificationService qualificationService, Context context, EvaluationFactory evaluationFactory, CommandExecutor commandExecutor, TaskSchedulingService taskSchedulingService, ExternalQualificationService externalQualificationService, QualificationBeanFactory qualificationBeanFactory, BusinessUnitManager businessUnitManager)
-
-
Method Details
-
runEvaluation
- Parameters:
evaluations- the evaluations to be ran
-
runEvaluationForParticipants
-
getCheckedAndUpdatedEvaluations
filters a list of evaluation to only those that can be evaluated- Parameters:
evaluations- the evaluations to be filtered- Returns:
- the evaluations to be ran
-
getOrCreateEvaluationData
get existing or create missing Evaluation_data for an Evaluation and some Registrations- Parameters:
evaluation- the evaluation to create Evaluation_data underregistrationCondition- a condition matching any Registration that Evaluation_data should be created for- Returns:
- the list of Evaluation_data
-
getParentEvaluationsWithoutChildren
Checks if the provided list ofEvaluationentities also includes their parent. If so, all children of the parent contained in the list get removed as they will be evaluated during evaluation process of their parent anyway. Note: This has to be done as the user may manually select a collection ofEvaluations from varying hierarchy level. As evaluation does not take the hierarchy level into concern, children might get evaluated after their parent, leading to results making the parent evaluation look incomplete.- Parameters:
evaluations- the list ofEvaluations to clean- Returns:
- the cleaned list of
Evaluationentities to evaluate
-