Interface ValidationsProvider

All Superinterfaces:
Supplier<List<Validation>>

public interface ValidationsProvider extends Supplier<List<Validation>>
Determines the validations to run for a specific artifact/set of components. For instance, each extension may provide their own to provide all validations for that extension.

Implementations will be discovered through SPI, using the Thread.getContextClassLoader() when MuleAstUtils.validate(org.mule.runtime.ast.api.ArtifactAst) was called.

Implementations must be stateless.

Since:
1.0
  • Method Details

    • getArtifactValidations

      default List<ArtifactValidation> getArtifactValidations()
      Returns:
      the ArtifactValidations to execute.
    • setArtifactRegionClassLoader

      default void setArtifactRegionClassLoader(ClassLoader artifactRegionClassLoader)
      Allows for validations that check for resources in the artifact.
      Parameters:
      artifactRegionClassLoader - the classLoader to use to load any resources referenced by the artifact.
      Since:
      1.1
    • setIgnoreParamsWithProperties

      default void setIgnoreParamsWithProperties(boolean ignoreParamsWithProperties)
      Determines whether a validation on a parameter value that has depends on a property is ignored or not.

      The default behavior is to execute all validations.

      Parameters:
      ignoreParamsWithProperties - true to ignore validations on parameters that have a property dependant value.
      Since:
      1.1