Class QualificationMaxAttemptsService

java.lang.Object
ch.tocco.nice2.optional.qualificationregistration.impl.QualificationMaxAttemptsService

@Component public class QualificationMaxAttemptsService extends Object
  • Constructor Details

    • QualificationMaxAttemptsService

      public QualificationMaxAttemptsService(QueryBuilderFactory queryBuilderFactory, Context context)
  • 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

      public Optional<Integer> getFallbackMaxAttempts(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 if getMaxAttempts(ModuleInformation) fails, since this is a lot less precise
      Returns:
      an optional containing the max attempts, empty if none were set