Support for Nested/Hierarchical Services
[sdc.git] / catalog-dao / src / main / java / org / openecomp / sdc / be / resources / data / category / CategoryData.java
index f5e76ae..8db7b53 100644 (file)
@@ -51,6 +51,9 @@ public class CategoryData extends GraphNode {
                categoryDataDefinition
                                .setNormalizedName((String) properties.get(GraphPropertiesDictionary.NORMALIZED_NAME.getProperty()));
                categoryDataDefinition.setName((String) properties.get(GraphPropertiesDictionary.NAME.getProperty()));
+               final Object useServiceSubstitutionForNestedServicesProperty = properties.get(GraphPropertiesDictionary.USE_SERVICE_SUBSTITUTION_FOR_NESTED_SERVICES.getProperty());
+               final boolean useServiceSubstitutionForNestedServices = useServiceSubstitutionForNestedServicesProperty != null && (boolean) useServiceSubstitutionForNestedServicesProperty;
+               categoryDataDefinition.setUseServiceSubstitutionForNestedServices(useServiceSubstitutionForNestedServices);
 
                Type listType = new TypeToken<List<String>>() {
                }.getType();
@@ -77,7 +80,8 @@ public class CategoryData extends GraphNode {
                addIfExists(map, GraphPropertiesDictionary.NORMALIZED_NAME, categoryDataDefinition.getNormalizedName());
                // String icons=getGson().toJson(categoryDataDefinition.getIcons());
                // addIfExists(map, GraphPropertiesDictionary.ICONS, icons);
-               addIfExists(map, GraphPropertiesDictionary.ICONS, categoryDataDefinition.getIcons());
+        addIfExists(map, GraphPropertiesDictionary.ICONS, categoryDataDefinition.getIcons());
+        addIfExists(map, GraphPropertiesDictionary.USE_SERVICE_SUBSTITUTION_FOR_NESTED_SERVICES, categoryDataDefinition.isUseServiceSubstitutionForNestedServices());
                return map;
        }