Class QualificationMaxAttemptsService
java.lang.Object
ch.tocco.nice2.optional.qualificationregistration.impl.QualificationMaxAttemptsService
-
Constructor Summary
ConstructorDescriptionQualificationMaxAttemptsService
(QueryBuilderFactory queryBuilderFactory, Context context) -
Method Summary
Modifier and TypeMethodDescriptiongetFallbackMaxAttempts
(Entity event) get the max attempts defined in the Evaluations and Inputs related to the given Event, prioritizing values from Evaluations and lower attempts parents of Evaluations as well as Evaluation_node_input_nodes are considered as well only use this as a fallback solution ifgetMaxAttempts(ModuleInformation)
fails, since this is a lot less precisegetMaxAttempts
(QualificationEventInformationService.ModuleInformation moduleInformation) get the max attempt from the node related to the data entity represented by the given module information parents of Evaluations as well as Evaluation_node_input_nodes are considered as well
-
Constructor Details
-
QualificationMaxAttemptsService
-
-
Method Details
-
getMaxAttempts
public Optional<Integer> getMaxAttempts(QualificationEventInformationService.ModuleInformation moduleInformation) get the max attempt from the node related to the data entity represented by the given module information parents of Evaluations as well as Evaluation_node_input_nodes are considered as well- Returns:
- an optional containing the max attempts, empty if none were set
-
getFallbackMaxAttempts
get the max attempts defined in the Evaluations and Inputs related to the given Event, prioritizing values from Evaluations and lower attempts parents of Evaluations as well as Evaluation_node_input_nodes are considered as well only use this as a fallback solution ifgetMaxAttempts(ModuleInformation)
fails, since this is a lot less precise- Returns:
- an optional containing the max attempts, empty if none were set
-