Update DOMRpcResult a bit
[mdsal.git] / dom / mdsal-dom-spi / src / main / java / org / opendaylight / mdsal / dom / spi / DefaultDOMRpcResult.java
index ab83d863cf6847c57cc57dbd7b96f0880c8b4f54..7974cc1582d66d0eee6bc2919943fb47e79d5af2 100644 (file)
@@ -21,7 +21,7 @@ import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.mdsal.dom.api.DOMRpcResult;
 import org.opendaylight.yangtools.concepts.Immutable;
 import org.opendaylight.yangtools.yang.common.RpcError;
-import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
+import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
 
 /**
  * Utility class implementing {@link DefaultDOMRpcResult}.
@@ -33,25 +33,24 @@ public final class DefaultDOMRpcResult implements DOMRpcResult, Immutable, Seria
     private static final long serialVersionUID = 1L;
 
     @SuppressFBWarnings(value = "SE_BAD_FIELD", justification = "Interfaces do not specify Serializable")
-    private final @Nullable NormalizedNode result;
+    private final @Nullable ContainerNode result;
     // FIXME: a plain Collection is bad for equality
     private final Collection<? extends RpcError> errors;
 
-    public DefaultDOMRpcResult(final NormalizedNode result, final RpcError... errors) {
-        this(result, List.of(errors));
+    public DefaultDOMRpcResult(final ContainerNode value, final RpcError... errors) {
+        this(value, List.of(errors));
     }
 
     public DefaultDOMRpcResult(final RpcError... errors) {
         this(null, List.of(errors));
     }
 
-    public DefaultDOMRpcResult(final @Nullable NormalizedNode result) {
+    public DefaultDOMRpcResult(final @Nullable ContainerNode result) {
         this(result, List.of());
     }
 
-    public DefaultDOMRpcResult(final @Nullable NormalizedNode result,
-            final Collection<? extends RpcError> errors) {
-        this.result = result;
+    public DefaultDOMRpcResult(final @Nullable ContainerNode value, final Collection<? extends RpcError> errors) {
+        result = value;
         this.errors = requireNonNull(errors);
     }
 
@@ -60,12 +59,12 @@ public final class DefaultDOMRpcResult implements DOMRpcResult, Immutable, Seria
     }
 
     @Override
-    public Collection<? extends RpcError> getErrors() {
+    public Collection<? extends RpcError> errors() {
         return errors;
     }
 
     @Override
-    public @Nullable NormalizedNode getResult() {
+    public @Nullable ContainerNode value() {
         return result;
     }