Add documentation 64/99264/4
authorIvan Hrasko <ivan.hrasko@pantheon.tech>
Tue, 11 Jan 2022 14:58:57 +0000 (15:58 +0100)
committerRobert Varga <nite@hq.sk>
Wed, 12 Jan 2022 15:51:54 +0000 (15:51 +0000)
Add and fix documentation for NetconfUtil class methods.

Change-Id: I696f3c074e82764b686f36009baead09b8646ae2
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
netconf/netconf-util/src/main/java/org/opendaylight/netconf/util/NetconfUtil.java

index 3ad497cc98712aff24807616ce3e5a70aa2e19f3..d50d0d71502c4a8f672ef5bb5de99be552667507 100644 (file)
@@ -134,6 +134,16 @@ public final class NetconfUtil {
                 + XmlUtil.toString(response));
     }
 
+    /**
+     * Write {@code normalized} data into {@link DOMResult}.
+     *
+     * @param normalized data to be written
+     * @param result     DOM result holder
+     * @param schemaPath schema path of the parent node
+     * @param context    mountpoint schema context
+     * @throws IOException        when failed to write data into {@link NormalizedNodeStreamWriter}
+     * @throws XMLStreamException when failed to serialize data into XML document
+     */
     @SuppressWarnings("checkstyle:IllegalCatch")
     public static void writeNormalizedNode(final NormalizedNode normalized, final DOMResult result,
                                            final SchemaPath schemaPath, final EffectiveModelContext context)
@@ -158,6 +168,17 @@ public final class NetconfUtil {
         }
     }
 
+    /**
+     * Write {@code normalized} data along with corresponding {@code metadata} into {@link DOMResult}.
+     *
+     * @param normalized data to be written
+     * @param metadata   metadata to be written
+     * @param result     DOM result holder
+     * @param schemaPath schema path of the parent node
+     * @param context    mountpoint schema context
+     * @throws IOException        when failed to write data into {@link NormalizedNodeStreamWriter}
+     * @throws XMLStreamException when failed to serialize data into XML document
+     */
     @SuppressWarnings("checkstyle:IllegalCatch")
     public static void writeNormalizedNode(final NormalizedNode normalized,
                                            final @Nullable NormalizedMetadata metadata,
@@ -330,7 +351,7 @@ public final class NetconfUtil {
      *
      * @param query  path to parent element
      * @param fields subpaths relative to parent path that identify specific fields
-     * @return created {@link TreeNode} structure
+     * @return created {@link PathNode} structure
      */
     private static PathNode constructPathArgumentTree(final YangInstanceIdentifier query,
             final List<YangInstanceIdentifier> fields) {