diff options
Diffstat (limited to 'cps-service')
3 files changed, 5 insertions, 5 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 76d9bba7e5..3b90b06cb0 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); diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy index 4e3d27964d..553027a4b8 100644 --- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy @@ -45,7 +45,7 @@ class CpsQueryServiceImplSpec extends Specification { 1 * mockCpsValidator.validateNameCharacters(dataspaceName, anchorName) where: 'all fetch descendants options are supported' fetchDescendantsOption << [FetchDescendantsOption.OMIT_DESCENDANTS, FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS, - FetchDescendantsOption.DIRECT_CHILD_ONLY, new FetchDescendantsOption(10)] + FetchDescendantsOption.DIRECT_CHILDREN_ONLY, new FetchDescendantsOption(10)] } def 'Query data nodes across all anchors by cps path with #fetchDescendantsOption.'() { diff --git a/cps-service/src/test/groovy/org/onap/cps/spi/FetchDescendantsOptionSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/spi/FetchDescendantsOptionSpec.groovy index 28bf38fb5e..c1958472e9 100644 --- a/cps-service/src/test/groovy/org/onap/cps/spi/FetchDescendantsOptionSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/spi/FetchDescendantsOptionSpec.groovy @@ -106,7 +106,7 @@ class FetchDescendantsOptionSpec extends Specification { where: 'the following option is used' fetchDescendantsOption || expectedStringValue FetchDescendantsOption.OMIT_DESCENDANTS || 'OmitDescendants' - FetchDescendantsOption.DIRECT_CHILD_ONLY || 'DirectChildOnly' + FetchDescendantsOption.DIRECT_CHILDREN_ONLY || 'DirectChildrenOnly' FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS || 'IncludeAllDescendants' new FetchDescendantsOption(2) || 'Depth=2' } |