summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java
index aa15d8ae8d..04fe9f54b6 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandler.java
@@ -51,6 +51,7 @@ import org.openecomp.sdc.be.datatypes.elements.ListDataDefinition;
import org.openecomp.sdc.be.datatypes.elements.OperationDataDefinition;
import org.openecomp.sdc.be.datatypes.elements.OperationInputDefinition;
import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
+import org.openecomp.sdc.be.datatypes.elements.SchemaDefinition;
import org.openecomp.sdc.be.model.InputDefinition;
import org.openecomp.sdc.be.model.InterfaceDefinition;
import org.openecomp.sdc.be.model.operations.impl.UniqueIdBuilder;
@@ -261,6 +262,15 @@ public class InterfaceDefinitionHandler {
propertyDef.setName(k);
propertyDef.setType(type.getType());
propertyDef.setValue(v.toString());
+ if (type.equals(ToscaPropertyType.LIST)) {
+ Gson gson = new Gson();
+ propertyDef.setValue(gson.toJson(v));
+ PropertyDataDefinition pdd = new PropertyDataDefinition();
+ pdd.setType("string");
+ SchemaDefinition sd = new SchemaDefinition();
+ sd.setProperty(pdd);
+ propertyDef.setSchema(sd);
+ }
artifactDataDefinition.addProperty(propertyDef);
}
});
@@ -294,6 +304,9 @@ public class InterfaceDefinitionHandler {
if (value instanceof Float || value instanceof Double) {
return ToscaPropertyType.FLOAT;
}
+ if (value instanceof List) {
+ return ToscaPropertyType.LIST;
+ }
return null;
}