diff options
author | vasraz <vasyl.razinkov@est.tech> | 2023-06-16 20:09:40 +0100 |
---|---|---|
committer | vasraz <vasyl.razinkov@est.tech> | 2023-06-16 20:09:40 +0100 |
commit | 4567889be798f0ac1798c7e489d6cf4f9951d2a6 (patch) | |
tree | 5a1808acada72b651829d2dc6522e5b6d3b441a9 /common-be/src | |
parent | e72d1667c08d3f018b483cebfb077108206b5e49 (diff) |
Support additional metadata in external assets api
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Change-Id: Ibae9ae54f0c5e4751a9ada8ee93f169da3a017ee
Issue-ID: SDC-4520
Diffstat (limited to 'common-be/src')
-rw-r--r-- | common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnum.java | 17 | ||||
-rw-r--r-- | common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnumTest.java | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnum.java b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnum.java index 3ba4ca62cd..522e4e6259 100644 --- a/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnum.java +++ b/common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnum.java @@ -17,6 +17,7 @@ package org.openecomp.sdc.be.datatypes.enums; import java.util.Arrays; import java.util.Collections; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; @@ -28,19 +29,21 @@ public enum FilterKeyEnum { CATEGORY("category"), VERSION("version"), METADATA("metadata"), + INCLUDE("include"), DISTRIBUTION_STATUS("distributionStatus"), NAME_FRAGMENT("nameFragment"); private final String name; private static final List<String> RESOURCES_FILTERED = Arrays.asList( - RESOURCE_TYPE.getName(), - SUB_CATEGORY.getName(), - CATEGORY.getName()); + RESOURCE_TYPE.getName(), + SUB_CATEGORY.getName(), + CATEGORY.getName()); private static final List<String> SERVICES_FILTERED = Arrays.asList( - CATEGORY.getName(), - DISTRIBUTION_STATUS.getName(), - VERSION.getName(), - METADATA.getName()); + CATEGORY.getName(), + DISTRIBUTION_STATUS.getName(), + VERSION.getName(), + INCLUDE.getName(), + METADATA.getName()); public static List<String> getValidFiltersByAssetType(ComponentTypeEnum assetType) { if (assetType == null) { diff --git a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnumTest.java b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnumTest.java index b08a32fc05..dc0bd1ddc7 100644 --- a/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnumTest.java +++ b/common-be/src/test/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnumTest.java @@ -44,7 +44,7 @@ class FilterKeyEnumTest { assertFalse(result.contains(VERSION.getName())); result = FilterKeyEnum.getValidFiltersByAssetType(ComponentTypeEnum.SERVICE); assertNotNull(result); - assertEquals(4, result.size()); + assertEquals(5, result.size()); assertTrue(result.contains(CATEGORY.getName())); assertFalse(result.contains(RESOURCE_TYPE.getName())); result = FilterKeyEnum.getValidFiltersByAssetType(ComponentTypeEnum.SERVICE_INSTANCE); |