Class QualificationEvaluationService
java.lang.Object
ch.tocco.nice2.optional.qualification.impl.services.QualificationEvaluationService
-
Constructor Summary
ConstructorDescriptionQualificationEvaluationService
(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 evaluatedgetParentEvaluationsWithoutChildren
(List<Entity> evaluations) Checks if the provided list ofEvaluation
entities also includes their parent.void
runEvaluation
(EntityList evaluations)
-
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
-
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
-
getParentEvaluationsWithoutChildren
Checks if the provided list ofEvaluation
entities 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 ofEvaluation
s 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 ofEvaluation
s to clean- Returns:
- the cleaned list of
Evaluation
entities to evaluate
-