From 032525a375681fb18cc498d8daed9d73faa21ec3 Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Tue, 23 Jun 2020 09:15:48 +0100 Subject: Support for Nested/Hierarchical Services Change-Id: I478cf2e1f9cf96443a3e35bf22ac2c9d72bca8f1 Issue-ID: SDC-3145 Signed-off-by: MichaelMorris --- .../org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java | 1 + .../org/openecomp/sdc/be/resources/data/category/CategoryData.java | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'catalog-dao') diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java index f0806291c7..e27839ecb9 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java @@ -122,6 +122,7 @@ public enum GraphPropertiesDictionary { CONTACTS ("contacts", String.class, false, false), //categorys ICONS ("icons", String.class, false, false), + USE_SERVICE_SUBSTITUTION_FOR_NESTED_SERVICES ("useServiceSubstitutionForNestedServices", Boolean.class, false, false), //relation CAPABILITY_OWNER_ID ("capOwnerId", String.class, false, false), REQUIREMENT_OWNER_ID ("reqOwnerId", String.class, false, false), diff --git a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/category/CategoryData.java b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/category/CategoryData.java index f5e76ae8aa..8db7b53017 100644 --- a/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/category/CategoryData.java +++ b/catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/category/CategoryData.java @@ -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>() { }.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; } -- cgit 1.2.3-korg