1 package org.opendaylight.controller.sal.restconf.impl.test;
3 import java.util.Collection;
5 import org.opendaylight.controller.md.sal.common.api.TransactionStatus;
6 import org.opendaylight.yangtools.yang.common.RpcError;
7 import org.opendaylight.yangtools.yang.common.RpcResult;
9 public class DummyRpcResult implements RpcResult<TransactionStatus> {
11 private final boolean isSuccessful;
12 private final TransactionStatus result;
13 private final Collection<RpcError> errors;
15 public DummyRpcResult() {
21 private DummyRpcResult(Builder builder) {
22 isSuccessful = builder.isSuccessful;
23 result = builder.result;
24 errors = builder.errors;
27 public static Builder builder() {
28 return new DummyRpcResult.Builder();
32 public boolean isSuccessful() {
37 public TransactionStatus getResult() {
42 public Collection<RpcError> getErrors() {
46 public static class Builder {
47 private boolean isSuccessful;
48 private TransactionStatus result;
49 private Collection<RpcError> errors;
51 public Builder isSuccessful(boolean isSuccessful) {
52 this.isSuccessful = isSuccessful;
56 public Builder result(TransactionStatus result) {
61 public Builder errors(Collection<RpcError> errors) {
66 public RpcResult<TransactionStatus> build() {
67 return new DummyRpcResult(this);