Support leaf-nodes-only in RFC8040 northbound
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / streams / listeners / AbstractQueryParams.java
index 2d9f2c11816b2ffc136bcf96536d27e39cf8e1e1..25265cf80c69e3f3dcd49d62818f91bbea8e17d4 100644 (file)
@@ -18,6 +18,7 @@ import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.restconf.common.errors.RestconfDocumentedException;
 import org.opendaylight.restconf.nb.rfc8040.FilterParam;
+import org.opendaylight.restconf.nb.rfc8040.LeafNodesOnlyParam;
 import org.opendaylight.restconf.nb.rfc8040.SkipNotificationDataParam;
 import org.opendaylight.restconf.nb.rfc8040.StartTimeParam;
 import org.opendaylight.restconf.nb.rfc8040.StopTimeParam;
@@ -57,11 +58,11 @@ abstract class AbstractQueryParams extends AbstractNotificationsData {
      */
     @SuppressWarnings("checkstyle:hiddenField")
     public final void setQueryParams(final StartTimeParam startTime, final StopTimeParam stopTime,
-            final FilterParam filter, final boolean leafNodesOnly,
+            final FilterParam filter, final LeafNodesOnlyParam leafNodesOnly,
             final SkipNotificationDataParam skipNotificationData) {
         start = startTime == null ? Instant.now() : parseDateAndTime(startTime.value());
         stop = stopTime == null ? null : parseDateAndTime(stopTime.value());
-        this.leafNodesOnly = leafNodesOnly;
+        this.leafNodesOnly = leafNodesOnly == null ? false : leafNodesOnly.value();
         this.skipNotificationData = skipNotificationData == null ? false : skipNotificationData.value();
 
         if (filter != null) {