From 9bd18657d2048d3396d15a394b4493b283c47e4d Mon Sep 17 00:00:00 2001 From: stasys10 Date: Mon, 29 Nov 2021 19:52:58 +0000 Subject: Add a display name for the category Issue-ID: SDC-3858 Change-Id: Ic818b3b4bc4f4e91c9da0cdacb40549a3f071c68 Signed-off-by: stasys10 --- .../java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java | 1 + .../java/org/openecomp/sdc/be/resources/data/category/CategoryData.java | 2 ++ 2 files changed, 3 insertions(+) (limited to 'catalog-dao/src/main/java') 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 145bcbdbc0..c689298fc1 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 @@ -33,6 +33,7 @@ public enum GraphPropertiesDictionary { HEALTH_CHECK ("healthcheckis", String.class, true, true), // Resource NAME ("name", String.class, false, true), + DISPLAY_NAME ("displayName", String.class, false, true), TOSCA_RESOURCE_NAME ("toscaResourceName", String.class, false, true), CATEGORY_NAME ("categoryName", String.class, false, true), VERSION ("version", String.class, false, true), 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 665e5c737d..cd585ab4c4 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 @@ -48,6 +48,7 @@ public class CategoryData extends GraphNode { this(NodeTypeEnum.getByName((String) properties.get(GraphPropertiesDictionary.LABEL.getProperty()))); categoryDataDefinition.setUniqueId((String) properties.get(GraphPropertiesDictionary.UNIQUE_ID.getProperty())); categoryDataDefinition.setNormalizedName((String) properties.get(GraphPropertiesDictionary.NORMALIZED_NAME.getProperty())); + categoryDataDefinition.setDisplayName((String) properties.get(GraphPropertiesDictionary.DISPLAY_NAME.getProperty())); categoryDataDefinition.setName((String) properties.get(GraphPropertiesDictionary.NAME.getProperty())); final Object useServiceSubstitutionForNestedServicesProperty = properties .get(GraphPropertiesDictionary.USE_SERVICE_SUBSTITUTION_FOR_NESTED_SERVICES.getProperty()); @@ -80,6 +81,7 @@ public class CategoryData extends GraphNode { Map map = new HashMap<>(); addIfExists(map, GraphPropertiesDictionary.UNIQUE_ID, categoryDataDefinition.getUniqueId()); addIfExists(map, GraphPropertiesDictionary.NAME, categoryDataDefinition.getName()); + addIfExists(map, GraphPropertiesDictionary.DISPLAY_NAME, categoryDataDefinition.getDisplayName()); addIfExists(map, GraphPropertiesDictionary.NORMALIZED_NAME, categoryDataDefinition.getNormalizedName()); addIfExists(map, GraphPropertiesDictionary.MODEL, categoryDataDefinition.getModels()); addIfExists(map, GraphPropertiesDictionary.ICONS, categoryDataDefinition.getIcons()); -- cgit 1.2.3-korg