Class ModelValidator<T>
- java.lang.Object
-
- io.wcm.devops.conga.tooling.maven.plugin.validation.ModelValidator<T>
-
- Type Parameters:
T
- Model class
- All Implemented Interfaces:
DefinitionValidator<T>
public final class ModelValidator<T> extends Object implements DefinitionValidator<T>
Validates YAML model file against it's reader.
-
-
Constructor Summary
Constructors Constructor Description ModelValidator(String modelName, ModelReader<T> modelReader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
validate(Resource resource, String pathForLog)
Validates the given resource
-
-
-
Constructor Detail
-
ModelValidator
public ModelValidator(String modelName, ModelReader<T> modelReader)
- Parameters:
modelName
- Model name (for log message)modelReader
- Model reader implementation
-
-
Method Detail
-
validate
public T validate(Resource resource, String pathForLog) throws org.apache.maven.plugin.MojoFailureException
Description copied from interface:DefinitionValidator
Validates the given resource- Specified by:
validate
in interfaceDefinitionValidator<T>
- Parameters:
resource
- ResourcepathForLog
- Path for log message- Returns:
- Result
- Throws:
org.apache.maven.plugin.MojoFailureException
- Mojo failure exception
-
-