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}.
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);
}
}
@Override
- public Collection<? extends RpcError> getErrors() {
+ public Collection<? extends RpcError> errors() {
return errors;
}
@Override
- public @Nullable NormalizedNode getResult() {
+ public @Nullable ContainerNode value() {
return result;
}