Class AllowedValuesValidator

java.lang.Object
de.redsix.dmncheck.validators.core.GenericValidator<org.operaton.bpm.model.dmn.instance.DecisionTable, org.operaton.bpm.model.dmn.instance.DecisionTable>
de.redsix.dmncheck.validators.core.SimpleValidator<org.operaton.bpm.model.dmn.instance.DecisionTable>
de.redsix.dmncheck.validators.AllowedValuesValidator
All Implemented Interfaces:
Validator

public class AllowedValuesValidator extends SimpleValidator<org.operaton.bpm.model.dmn.instance.DecisionTable>
Checks that input and output entries only use the allowed values of the item definition of their column.
  • Constructor Details

    • AllowedValuesValidator

      public AllowedValuesValidator()
  • Method Details

    • documentation

      public Optional<String> documentation()
      Description copied from interface: Validator
      Link to a detailed description of the problems reported by this validator and how to solve them.
      Returns:
      URL of the documentation, if available
    • apply

      public List<ValidationResult> apply(org.operaton.bpm.model.dmn.DmnModelInstance dmnModelInstance)
      Description copied from interface: Validator
      Validates the given DMN model instance and returns the validation results as a list.
      Specified by:
      apply in interface Validator
      Overrides:
      apply in class GenericValidator<org.operaton.bpm.model.dmn.instance.DecisionTable, org.operaton.bpm.model.dmn.instance.DecisionTable>
      Parameters:
      dmnModelInstance - DMN model instance used for validation
      Returns:
      A possibly empty list of validation results
    • getClassUnderValidation

      public Class<org.operaton.bpm.model.dmn.instance.DecisionTable> getClassUnderValidation()
      Description copied from class: GenericValidator
      Auxiliary method to determine the class for the validation.
      Specified by:
      getClassUnderValidation in class GenericValidator<org.operaton.bpm.model.dmn.instance.DecisionTable, org.operaton.bpm.model.dmn.instance.DecisionTable>
      Returns:
      Class used for validation
    • isApplicable

      public boolean isApplicable(org.operaton.bpm.model.dmn.instance.DecisionTable decisionTable, ValidationContext validationContext)
      Description copied from class: GenericValidator
      Checks whether the validation is applicable for an element of type S taking account of the validation context.
      Specified by:
      isApplicable in class GenericValidator<org.operaton.bpm.model.dmn.instance.DecisionTable, org.operaton.bpm.model.dmn.instance.DecisionTable>
      Parameters:
      decisionTable - Element used to check applicability of the validation
      validationContext - Validation Context
      Returns:
      Whether the validation is applicable
    • validate

      public List<ValidationResult> validate(org.operaton.bpm.model.dmn.instance.DecisionTable decisionTable, ValidationContext validationContext)
      Description copied from class: GenericValidator
      Validates a given element of type T.

      A validation context can be used to track global assumptions about the DMN model instance.

      Specified by:
      validate in class GenericValidator<org.operaton.bpm.model.dmn.instance.DecisionTable, org.operaton.bpm.model.dmn.instance.DecisionTable>
      Parameters:
      decisionTable - Element under validation
      validationContext - Validation Context
      Returns:
      A list of validation results