Set property element Type to 'inputs' of 'Plan'.
authorYuanHu <yuan.hu1@zte.com.cn>
Tue, 25 Oct 2016 06:29:07 +0000 (14:29 +0800)
committerYuanHu <yuan.hu1@zte.com.cn>
Tue, 25 Oct 2016 06:30:17 +0000 (14:30 +0800)
Change-Id: I61f150f3a9787ee112c355b5e87367e53e6f4b0b
Issue-id: TOSCA-141
Signed-off-by: YuanHu <yuan.hu1@zte.com.cn>
catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/model/common/TemplateUtils.java

index e1e89d1..ffb4a4d 100644 (file)
  */
 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);
   }