diff options
Diffstat (limited to 'mod2/helm-generator/helmchartgenerator-core/src/main/java/org/onap/dcaegen2/platform/helmchartgenerator/chartbuilder/ChartBuilder.java')
-rw-r--r-- | mod2/helm-generator/helmchartgenerator-core/src/main/java/org/onap/dcaegen2/platform/helmchartgenerator/chartbuilder/ChartBuilder.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mod2/helm-generator/helmchartgenerator-core/src/main/java/org/onap/dcaegen2/platform/helmchartgenerator/chartbuilder/ChartBuilder.java b/mod2/helm-generator/helmchartgenerator-core/src/main/java/org/onap/dcaegen2/platform/helmchartgenerator/chartbuilder/ChartBuilder.java index ac73544..21f5dae 100644 --- a/mod2/helm-generator/helmchartgenerator-core/src/main/java/org/onap/dcaegen2/platform/helmchartgenerator/chartbuilder/ChartBuilder.java +++ b/mod2/helm-generator/helmchartgenerator-core/src/main/java/org/onap/dcaegen2/platform/helmchartgenerator/chartbuilder/ChartBuilder.java @@ -41,14 +41,20 @@ public class ChartBuilder { @Autowired private ChartGenerator chartGenerator; + @Autowired + private ChartTemplateStructureValidator validator; + /** * constructor of ChartBuilder * @param specParser implementation of ComponentSpecParser * @param chartGenerator implementation of ChartGenerator + * @param validator implementation of Chart Template Validator */ - public ChartBuilder(ComponentSpecParser specParser, ChartGenerator chartGenerator) { + public ChartBuilder(ComponentSpecParser specParser, ChartGenerator chartGenerator, + ChartTemplateStructureValidator validator) { this.specParser = specParser; this.chartGenerator = chartGenerator; + this.validator = validator; } /** @@ -61,7 +67,7 @@ public class ChartBuilder { * @throws Exception */ public File build(String specFileLocation, String chartTemplateLocation, String outputLocation, String specSchemaLocation ) throws Exception { - ChartTemplateStructureValidator.validateChartTemplateStructure(chartTemplateLocation); + validator.validateChartTemplateStructure(chartTemplateLocation); ChartInfo chartInfo = specParser.extractChartInfo(specFileLocation, chartTemplateLocation, specSchemaLocation); return chartGenerator.generate(chartTemplateLocation, chartInfo, outputLocation); } |