X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fyang-prototype%2Fsal%2Fsal-common-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcommon%2Futil%2FRpcs.java;fp=opendaylight%2Fsal%2Fyang-prototype%2Fsal%2Fsal-common-util%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcommon%2Futil%2FRpcs.java;h=0000000000000000000000000000000000000000;hb=fe024ad74b8656c3ee61b9ddff6009a779aa2189;hp=e46b566522e26232081cd1fd72a96d873bdebae5;hpb=437c1bdb967072319e81774bdcf570b2fb0f7b89;p=controller.git diff --git a/opendaylight/sal/yang-prototype/sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Rpcs.java b/opendaylight/sal/yang-prototype/sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Rpcs.java deleted file mode 100644 index e46b566522..0000000000 --- a/opendaylight/sal/yang-prototype/sal/sal-common-util/src/main/java/org/opendaylight/controller/sal/common/util/Rpcs.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.sal.common.util; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import org.opendaylight.yangtools.yang.common.RpcError; -import org.opendaylight.yangtools.yang.common.RpcResult; - -public class Rpcs { - public static RpcResult getRpcResult(boolean successful, T result, - Collection errors) { - RpcResult ret = new RpcResultTO(successful, result, errors); - return ret; - } - - private static class RpcResultTO implements RpcResult { - - private final Collection errors; - private final T result; - private final boolean successful; - - public RpcResultTO(boolean successful, T result, - Collection errors) { - this.successful = successful; - this.result = result; - this.errors = Collections.unmodifiableList(new ArrayList( - errors)); - } - - @Override - public boolean isSuccessful() { - return successful; - } - - @Override - public T getResult() { - return result; - } - - @Override - public Collection getErrors() { - return errors; - } - - } -}