public class TemplateValidator
extends java.lang.Object
This validator ensures:
apply, may have rollback, must NOT have stepssteps, must NOT have apply or rollback at root levelThe validator is stateless and used at runtime during pipeline building to catch structural mismatches before any change execution begins.
| Modifier and Type | Class and Description |
|---|---|
static class |
TemplateValidator.TemplateType
Enumeration of template types for validation purposes.
|
| Constructor and Description |
|---|
TemplateValidator()
Creates a new TemplateValidator.
|
| Modifier and Type | Method and Description |
|---|---|
ValidationResult |
validate(TemplatePreviewChange preview)
Validates the YAML content structure against the template type, performing
template lookup from the registry.
|
ValidationResult |
validateStructure(ChangeTemplateDefinition definition,
TemplatePreviewChange preview)
Validates the YAML content structure against a resolved template definition.
|
public TemplateValidator()
public ValidationResult validate(TemplatePreviewChange preview)
preview - the template preview change to validatepublic ValidationResult validateStructure(ChangeTemplateDefinition definition, TemplatePreviewChange preview)
TemplateLoadedChangeBuilder which already has the template definition
resolved, avoiding a redundant lookup.definition - the resolved template definitionpreview - the template preview change to validate