summaryrefslogtreecommitdiffstats
path: root/catalog-dao
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-dao
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-dao')
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/dao/neo4j/GraphPropertiesDictionary.java1
-rw-r--r--catalog-dao/src/main/java/org/openecomp/sdc/be/resources/data/category/CategoryData.java7
2 files changed, 6 insertions, 2 deletions
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 5a287c9261..2f82cb51c6 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
@@ -134,6 +134,7 @@ public enum GraphPropertiesDictionary {
ICONS ("icons", String.class, false, false),
METADATA_KEYS ("metadataKeys", String.class, false, false),
USE_SERVICE_SUBSTITUTION_FOR_NESTED_SERVICES ("useServiceSubstitutionForNestedServices", Boolean.class, false, false),
+ NOT_APPLICABLE_METADATA_KEYS("notApplicableMetadataKeys", String.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 cd585ab4c4..c1c6b2a562 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
@@ -57,8 +57,10 @@ public class CategoryData extends GraphNode {
categoryDataDefinition.setUseServiceSubstitutionForNestedServices(useServiceSubstitutionForNestedServices);
Type listType = new TypeToken<List<String>>() {
}.getType();
- List<String> iconsfromJson = getGson().fromJson((String) properties.get(GraphPropertiesDictionary.ICONS.getProperty()), listType);
- categoryDataDefinition.setIcons(iconsfromJson);
+ categoryDataDefinition.setNotApplicableMetadataKeys(
+ getGson().fromJson((String) properties.get(GraphPropertiesDictionary.NOT_APPLICABLE_METADATA_KEYS.getProperty()), listType));
+ List<String> iconsFromJson = getGson().fromJson((String) properties.get(GraphPropertiesDictionary.ICONS.getProperty()), listType);
+ categoryDataDefinition.setIcons(iconsFromJson);
categoryDataDefinition.setModels(getGson().fromJson((String) properties.get(GraphPropertiesDictionary.MODEL.getProperty()), listType));
final Type metadataKeylistType = new TypeToken<List<MetadataKeyDataDefinition>>() {
}.getType();
@@ -87,6 +89,7 @@ public class CategoryData extends GraphNode {
addIfExists(map, GraphPropertiesDictionary.ICONS, categoryDataDefinition.getIcons());
addIfExists(map, GraphPropertiesDictionary.USE_SERVICE_SUBSTITUTION_FOR_NESTED_SERVICES,
categoryDataDefinition.isUseServiceSubstitutionForNestedServices());
+ addIfExists(map, GraphPropertiesDictionary.NOT_APPLICABLE_METADATA_KEYS, categoryDataDefinition.getNotApplicableMetadataKeys());
addIfExists(map, GraphPropertiesDictionary.METADATA_KEYS, categoryDataDefinition.getMetadataKeys());
return map;
}