summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main/java
diff options
context:
space:
mode:
authordavsad <david.sadlier@est.tech>2021-08-23 05:54:13 +0100
committerDavid Sadlier <david.sadlier@est.tech>2021-08-23 23:09:40 +0000
commit38f534f4c7c425f49925dd2d3615729eba703130 (patch)
treefcf7b3d0430e83d1ebf769fa1d85ddabcc6eb46f /catalog-model/src/main/java
parente5b8482c4d2ceddf559da26e532fdbb95a593dc1 (diff)
Filter catalog in UI based on model
Issue-ID: SDC-3679 Signed-off-by: davsad <david.sadlier@est.tech> Change-Id: Icd0eeb13dbfb1cc27745c7adf6a3212210e00a4a
Diffstat (limited to 'catalog-model/src/main/java')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/catalog/CatalogComponent.java1
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperation.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/catalog/CatalogComponent.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/catalog/CatalogComponent.java
index 5d28db9b98..f65c84f474 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/catalog/CatalogComponent.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/catalog/CatalogComponent.java
@@ -53,6 +53,7 @@ public class CatalogComponent {
private Boolean isHighestVersion;
private String lastUpdaterUserId;
private List<CategoryDefinition> categories;
+ private String model;
public List<String> getTags() {
return tags == null ? Collections.emptyList() : ImmutableList.copyOf(tags);
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperation.java
index bfb6cae3aa..d0f1c3a9dd 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/jsonjanusgraph/operations/ToscaElementOperation.java
@@ -1336,6 +1336,7 @@ public abstract class ToscaElementOperation extends BaseOperation {
if (isAddToCatalog(excludeTypes, metadatObj) && (existInCatalog.get(uniqueId) == null && (isDeleted == null || !isDeleted.booleanValue()))) {
CatalogComponent catalogComponent = new CatalogComponent();
catalogComponent.setUniqueId(uniqueId);
+ catalogComponent.setModel((String) metadatObj.get(JsonPresentationFields.MODEL.getPresentation()));
catalogComponent
.setComponentType(ComponentTypeEnum.valueOf((String) metadatObj.get(JsonPresentationFields.COMPONENT_TYPE.getPresentation())));
catalogComponent.setVersion((String) metadatObj.get(JsonPresentationFields.VERSION.getPresentation()));