diff options
author | 2023-07-31 16:50:32 +0530 | |
---|---|---|
committer | 2023-07-31 16:51:09 +0530 | |
commit | 77ef0b4e4ab1330a6e86ddb0ec57cafad0d6e513 (patch) | |
tree | 53583087ee639de02214cf4eaabcfae01a02936a /cps-service/src/main | |
parent | 50851e424f8cbc7b11db5c2b840a62dc1c995207 (diff) |
Add 'direct' keyword to descendants option to query direct children (ep1)
-added 'direct' keyword also to Fetch Descendants Option along with 'all' and 'none' to Query direct child.
-added unit tests to test direct keyword
Issue-ID: CPS-1784
Change-Id: Icb7f59fbeebb03703626132d6d5d2cfde0e5ab4d
Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
Diffstat (limited to 'cps-service/src/main')
-rw-r--r-- | cps-service/src/main/java/org/onap/cps/spi/FetchDescendantsOption.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/spi/FetchDescendantsOption.java b/cps-service/src/main/java/org/onap/cps/spi/FetchDescendantsOption.java index 76d9bba7e..3b90b06cb 100644 --- a/cps-service/src/main/java/org/onap/cps/spi/FetchDescendantsOption.java +++ b/cps-service/src/main/java/org/onap/cps/spi/FetchDescendantsOption.java @@ -30,8 +30,8 @@ import org.onap.cps.spi.exceptions.DataValidationException; @RequiredArgsConstructor public class FetchDescendantsOption { - public static final FetchDescendantsOption DIRECT_CHILD_ONLY - = new FetchDescendantsOption(1, "DirectChildOnly"); + public static final FetchDescendantsOption DIRECT_CHILDREN_ONLY + = new FetchDescendantsOption(1, "DirectChildrenOnly"); public static final FetchDescendantsOption OMIT_DESCENDANTS = new FetchDescendantsOption(0, "OmitDescendants"); public static final FetchDescendantsOption INCLUDE_ALL_DESCENDANTS @@ -97,7 +97,7 @@ public class FetchDescendantsOption { } else if ("-1".equals(fetchDescendantsOptionAsString) || "all".equals(fetchDescendantsOptionAsString)) { return FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS; } else if ("1".equals(fetchDescendantsOptionAsString) || "direct".equals(fetchDescendantsOptionAsString)) { - return FetchDescendantsOption.DIRECT_CHILD_ONLY; + return FetchDescendantsOption.DIRECT_CHILDREN_ONLY; } else { final Integer depth = Integer.valueOf(fetchDescendantsOptionAsString); return new FetchDescendantsOption(depth); |