From 6e12c8ad59f11426e49f81c4a7032480b126bfbc Mon Sep 17 00:00:00 2001 From: vasraz Date: Mon, 23 Jan 2023 20:10:43 +0000 Subject: Implement hiding mechanism Signed-off-by: Vasyl Razinkov Change-Id: I799af15e31b724ca394eebe435223c03186fb6d3 Issue-ID: SDC-4344 --- .../sdc/be/components/impl/CategoriesImportManager.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'catalog-be') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CategoriesImportManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CategoriesImportManager.java index 39ff0017ab..340c5b1814 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CategoriesImportManager.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CategoriesImportManager.java @@ -19,6 +19,12 @@ */ package org.openecomp.sdc.be.components.impl; +import static org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary.DISPLAY_NAME; +import static org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary.ICONS; +import static org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary.NAME; +import static org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary.NOT_APPLICABLE_METADATA_KEYS; +import static org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary.USE_SERVICE_SUBSTITUTION_FOR_NESTED_SERVICES; + import fj.data.Either; import java.util.ArrayList; import java.util.Collections; @@ -226,19 +232,20 @@ public class CategoriesImportManager { for (Entry entry : categories.entrySet()) { CategoryDefinition catDef = new CategoryDefinition(); Map category = (Map) entry.getValue(); - catName = (String) category.get("name"); + catName = (String) category.get(NAME.getProperty()); catDef.setName(catName); - catDef.setDisplayName((String) category.get("displayName")); - icons = (List) category.get("icons"); + catDef.setDisplayName((String) category.get(DISPLAY_NAME.getProperty())); + icons = (List) category.get(ICONS.getProperty()); catDef.setIcons(icons); String normalizedName = ValidationUtils.normalizeCategoryName4Uniqueness(catName); catDef.setNormalizedName(normalizedName); catDef.setModels((List) category.get("models")); - final Object useServiceSubstitutionForNestedServicesProperty = category.get("useServiceSubstitutionForNestedServices"); + final Object useServiceSubstitutionForNestedServicesProperty = category.get(USE_SERVICE_SUBSTITUTION_FOR_NESTED_SERVICES.getProperty()); final boolean useServiceSubstitutionForNestedServices = useServiceSubstitutionForNestedServicesProperty == null ? false : (Boolean) useServiceSubstitutionForNestedServicesProperty; catDef.setUseServiceSubstitutionForNestedServices(useServiceSubstitutionForNestedServices); catDef.setMetadataKeys(getMetadataKeys(category)); + catDef.setNotApplicableMetadataKeys((List) category.get(NOT_APPLICABLE_METADATA_KEYS.getProperty())); categoriesDef.add(catDef); } return categoriesDef; -- cgit 1.2.3-korg