public interface Validation
Implementations must be stateless.
| Modifier and Type | Interface and Description |
|---|---|
static class |
Validation.Level
Defines the severity of a validation failure.
|
| Modifier and Type | Method and Description |
|---|---|
Predicate<List<ComponentAst>> |
applicable()
Determines if this validation has to be applied to a given component.
|
String |
getDescription() |
Validation.Level |
getLevel() |
String |
getName() |
Optional<ValidationResultItem> |
validate(ComponentAst component,
ArtifactAst artifact)
Runs this validation in the provided component.
|
String getName()
String getDescription()
Validation.Level getLevel()
Predicate<List<ComponentAst>> applicable()
Refer to ComponentAstPredicatesFactory.
Optional<ValidationResultItem> validate(ComponentAst component, ArtifactAst artifact)
This method will only be called for components for which the applicable() predicate was true.
Refer to the factory methods in ValidationResultItem for creating the object to be returned.
component - the component under validationartifact - the full artifact, for any context needed for the validationempty if the validation passed, or a result object describing the failure otherwise.Copyright © 2025 MuleSoft, Inc.. All rights reserved.