Interface ValidationResultItem


@NoImplement public interface ValidationResultItem
Relates a failing validation to the component where that validation failed.
Since:
1.0
  • Method Details

    • create

      static ValidationResultItem create(ComponentAst component, Validation validation, String message)
      Parameters:
      component - the component this validation result applies to.
      validation - the validation that failed.
      message - the message explaining the reason of the validation failure.
      Returns:
      an object representing a validation failure.
    • create

      static ValidationResultItem create(ComponentAst component, Validation validation, String message, boolean causedByDynamicArtifact)
      Parameters:
      component - the component this validation result applies to.
      validation - the validation that failed.
      message - the message explaining the reason of the validation failure.
      causedByDynamicArtifact - true if this ValidationResultItem is caused by a dynamic element in the artifact.
      Returns:
      an object representing a validation failure.
      Since:
      1.1
    • create

      static ValidationResultItem create(ComponentAst component, ComponentParameterAst parameter, Validation validation, String message)
      Parameters:
      component - the component this validation result applies to.
      parameter - the parameter from the component this validation result applies to.
      validation - the validation that failed.
      message - the message explaining the reason of the validation failure.
      Returns:
      an object representing a validation failure.
    • create

      static ValidationResultItem create(ComponentAst component, List<ComponentParameterAst> parameters, Validation validation, String message)
      Parameters:
      component - the component this validation result applies to.
      parameters - the parameters from the component this validation result applies to.
      validation - the validation that failed.
      message - the message explaining the reason of the validation failure.
      Returns:
      an object representing a validation failure.
    • create

      static ValidationResultItem create(ComponentAst component, List<ComponentParameterAst> parameters, Validation validation, String message, boolean causedByDynamicArtifact)
      Parameters:
      component - the component this validation result applies to.
      parameters - the parameters from the component this validation result applies to.
      validation - the validation that failed.
      message - the message explaining the reason of the validation failure.
      causedByDynamicArtifact - true if this ValidationResultItem is caused by a dynamic element in the artifact.
      Returns:
      an object representing a validation failure.
      Since:
      1.1
    • create

      static ValidationResultItem create(ComponentAst component, ComponentParameterAst parameter, Validation validation, String message, Map<String,String> additionalData)
      Parameters:
      component - the component this validation result applies to.
      parameter - the parameter from the component this validation result applies to.
      validation - the validation that failed.
      message - the message explaining the reason of the validation failure.
      additionalData - additional data provided by the actual validation.
      Returns:
      an object representing a validation failure.
    • create

      static ValidationResultItem create(ComponentAst component, List<ComponentParameterAst> parameters, Validation validation, String message, Map<String,String> additionalData)
      Parameters:
      component - the component this validation result applies to.
      parameters - the parameters from the component this validation result applies to.
      validation - the validation that failed.
      message - the message explaining the reason of the validation failure.
      additionalData - additional data provided by the actual validation.
      Returns:
      an object representing a validation failure.
    • create

      static ValidationResultItem create(ComponentAst component, List<ComponentParameterAst> parameters, Validation validation, String message, Map<String,String> additionalData, boolean causedByDynamicArtifact)
      Parameters:
      component - the component this validation result applies to.
      parameters - the parameters from the component this validation result applies to.
      validation - the validation that failed.
      message - the message explaining the reason of the validation failure.
      additionalData - additional data provided by the actual validation.
      causedByDynamicArtifact - true if this ValidationResultItem is caused by a dynamic element in the artifact.
      Returns:
      an object representing a validation failure.
      Since:
      1.1
    • create

      static ValidationResultItem create(List<ComponentAst> components, Validation validation, String message)
      Parameters:
      components - the components this validation result applies to.
      validation - the validation that failed.
      message - the message explaining the reason of the validation failure.
      Returns:
      an object representing a validation failure.
    • create

      static ValidationResultItem create(List<ComponentAst> components, List<ComponentParameterAst> parameters, Validation validation, String message)
      Parameters:
      components - the components this validation result applies to.
      parameters - the parameters from the components this validation result applies to.
      validation - the validation that failed.
      message - the message explaining the reason of the validation failure.
      Returns:
      an object representing a validation failure.
    • create

      static ValidationResultItem create(List<ComponentAst> components, List<ComponentParameterAst> parameters, Validation validation, String message, Map<String,String> additionalData)
      Parameters:
      components - the components this validation result applies to.
      parameters - the parameters from the components this validation result applies to.
      validation - the validation that failed.
      message - the message explaining the reason of the validation failure.
      additionalData - additional data provided by the actual validation.
      Returns:
      an object representing a validation failure.
    • getComponents

      List<ComponentAst> getComponents()
      Returns:
      the components this validation result applies to.
    • getParameters

      List<ComponentParameterAst> getParameters()
      Returns:
      the parameters from the components this validation result applies to.
    • getValidation

      Validation getValidation()
      Returns:
      the validation that failed.
    • getMessage

      String getMessage()
      Returns:
      the message explaining the reason of the validation failure.
    • getAdditionalData

      Map<String,String> getAdditionalData()
      Any additional data provided by the actual validation, providing context for this item (for instance, in the case of validation on parameter values, it may contain an entry indication in which character of the value the validation error was found).
      Since:
      1.1
    • causedByDynamicArtifact

      boolean causedByDynamicArtifact()
      Determines if this ValidationResultItem is caused by a dynamic element in the artifact, which would prevent the creation of the complete ArtifactAst.

      For instance, if an `import` element references a file with a property, i.e:

        <import file="config-${someProperty}.xml" />
       
      and that property is configured in runtime, there is no way before deployment to runtime to generate the expected AST.
      Returns:
      true if this ValidationResultItem is caused by a dynamic element in the artifact.
      Since:
      1.1