summaryrefslogtreecommitdiffstats
path: root/catalog-be/src
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2023-01-23 20:10:43 +0000
committerVasyl Razinkov <vasyl.razinkov@est.tech>2023-01-25 19:34:46 +0000
commit6e12c8ad59f11426e49f81c4a7032480b126bfbc (patch)
tree95ed2d948183f08afae133d16a6b0275f41f1058 /catalog-be/src
parentbd98d1022cac4cd0aaa6827b8eb4b7772b2fc033 (diff)
Implement hiding mechanism
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: I799af15e31b724ca394eebe435223c03186fb6d3 Issue-ID: SDC-4344
Diffstat (limited to 'catalog-be/src')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/CategoriesImportManager.java15
1 files changed, 11 insertions, 4 deletions
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<String, Object> entry : categories.entrySet()) {
CategoryDefinition catDef = new CategoryDefinition();
Map<String, Object> category = (Map<String, Object>) entry.getValue();
- catName = (String) category.get("name");
+ catName = (String) category.get(NAME.getProperty());
catDef.setName(catName);
- catDef.setDisplayName((String) category.get("displayName"));
- icons = (List<String>) category.get("icons");
+ catDef.setDisplayName((String) category.get(DISPLAY_NAME.getProperty()));
+ icons = (List<String>) category.get(ICONS.getProperty());
catDef.setIcons(icons);
String normalizedName = ValidationUtils.normalizeCategoryName4Uniqueness(catName);
catDef.setNormalizedName(normalizedName);
catDef.setModels((List<String>) 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<String>) category.get(NOT_APPLICABLE_METADATA_KEYS.getProperty()));
categoriesDef.add(catDef);
}
return categoriesDef;