Add 'direct' keyword to descendants option to query direct children (ep1)
[cps.git] / cps-service / src / main / java / org / onap / cps / spi / FetchDescendantsOption.java
index 76d9bba..3b90b06 100644 (file)
@@ -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);