From 5f448cfb1e8ce12b559a635268a406060d30d592 Mon Sep 17 00:00:00 2001 From: YuanHu Date: Tue, 25 Oct 2016 14:29:07 +0800 Subject: Set property element Type to 'inputs' of 'Plan'. Change-Id: I61f150f3a9787ee112c355b5e87367e53e6f4b0b Issue-id: TOSCA-141 Signed-off-by: YuanHu --- .../catalog/model/common/TemplateUtils.java | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/TemplateUtils.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/TemplateUtils.java index e1e89d19..ffb4a4dc 100644 --- a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/TemplateUtils.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/TemplateUtils.java @@ -15,16 +15,6 @@ */ package org.openo.commontosca.catalog.model.common; -import org.openo.commontosca.catalog.db.exception.CatalogResourceException; -import org.openo.commontosca.catalog.model.parser.yaml.yamlmodel.Plan; -import org.openo.commontosca.catalog.model.parser.yaml.yamlmodel.ServiceTemplate; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.esotericsoftware.yamlbeans.YamlConfig; -import com.esotericsoftware.yamlbeans.YamlException; -import com.esotericsoftware.yamlbeans.YamlReader; - import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.FileInputStream; @@ -37,6 +27,17 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import java.util.zip.ZipInputStream; +import org.openo.commontosca.catalog.db.exception.CatalogResourceException; +import org.openo.commontosca.catalog.model.parser.yaml.yamlmodel.Input; +import org.openo.commontosca.catalog.model.parser.yaml.yamlmodel.Plan; +import org.openo.commontosca.catalog.model.parser.yaml.yamlmodel.ServiceTemplate; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.esotericsoftware.yamlbeans.YamlConfig; +import com.esotericsoftware.yamlbeans.YamlException; +import com.esotericsoftware.yamlbeans.YamlReader; + public class TemplateUtils { private static final Logger logger = LoggerFactory.getLogger(TemplateUtils.class); @@ -76,6 +77,7 @@ public class TemplateUtils { */ private static void adjustConfig(YamlConfig config) { config.setPropertyElementType(ServiceTemplate.class, "plans", Plan.class); + config.setPropertyElementType(Plan.class, "inputs", Input.class); } -- cgit 1.2.3-korg