Add Child Nodes Only query parameter to SSE events
[netconf.git] / restconf / restconf-nb / src / main / java / org / opendaylight / restconf / nb / rfc8040 / streams / listeners / JSONDataTreeCandidateFormatter.java
index 62f82329eee976dd7e56e88b9b8bdd36251ebb3a..226db6a7a4a36c8d8580506727154063f04fa2eb 100644 (file)
@@ -54,9 +54,8 @@ public final class JSONDataTreeCandidateFormatter extends DataTreeCandidateForma
 
     @Override
     String createText(final EffectiveModelContext schemaContext, final Collection<DataTreeCandidate> input,
-                      final Instant now, final boolean leafNodesOnly, final boolean skipData,
-                      final boolean changedLeafNodesOnly)
-            throws IOException {
+            final Instant now, final boolean leafNodesOnly, final boolean skipData, final boolean changedLeafNodesOnly,
+            final boolean childNodesOnly) throws IOException {
         final Writer writer = new StringWriter();
         final JsonWriter jsonWriter = new JsonWriter(writer).beginObject();
 
@@ -67,7 +66,7 @@ public final class JSONDataTreeCandidateFormatter extends DataTreeCandidateForma
         final var serializer = new JsonDataTreeCandidateSerializer(schemaContext, codecSupplier, jsonWriter);
         boolean nonEmpty = false;
         for (var candidate : input) {
-            nonEmpty |= serializer.serialize(candidate, leafNodesOnly, skipData, changedLeafNodesOnly);
+            nonEmpty |= serializer.serialize(candidate, leafNodesOnly, skipData, changedLeafNodesOnly, childNodesOnly);
         }
 
         // data-change-event