+
+ /**
+ * @return translator from {@link UpdateGroupOutput} to {@link AddGroupOutput}
+ */
+ public static Function<RpcResult<UpdateGroupOutput>, RpcResult<AddGroupOutput>> createForAddGroupOutput() {
+ return new Function<RpcResult<UpdateGroupOutput>,RpcResult<AddGroupOutput>>() {
+
+ @Override
+ public RpcResult<AddGroupOutput> apply(final RpcResult<UpdateGroupOutput> input) {
+ UpdateGroupOutput updateGroupOutput = input.getResult();
+
+ AddGroupOutputBuilder addGroupOutput = new AddGroupOutputBuilder();
+ addGroupOutput.setTransactionId(updateGroupOutput.getTransactionId());
+ AddGroupOutput result = addGroupOutput.build();
+
+ RpcResult<AddGroupOutput> rpcResult = assembleRpcResult(input, result);
+ LOG.debug("Returning the Add Group RPC result to MD-SAL");
+ return rpcResult;
+ }
+ };
+ }
+
+ /**
+ * @return rpc result function for group udpate
+ */
+ public static Function<RpcResult<UpdateGroupOutput>,RpcResult<RemoveGroupOutput>> createForRemoveGroupOutput() {
+ return new Function<RpcResult<UpdateGroupOutput>,RpcResult<RemoveGroupOutput>>() {
+
+ @Override
+ public RpcResult<RemoveGroupOutput> apply(RpcResult<UpdateGroupOutput> input) {
+
+ UpdateGroupOutput updateGroupOutput = input.getResult();
+
+ RemoveGroupOutputBuilder removeGroupOutput = new RemoveGroupOutputBuilder();
+ removeGroupOutput.setTransactionId(updateGroupOutput.getTransactionId());
+ RemoveGroupOutput result = removeGroupOutput.build();
+
+ RpcResult<RemoveGroupOutput> rpcResult = assembleRpcResult(input, result);
+ LOG.debug("Returning the Remove Group RPC result to MD-SAL");
+ return rpcResult;
+ }
+
+ };
+ }
+
+ /**
+ * @return translator from {@link UpdateMeterOutput} to {@link AddMeterOutput}
+ */
+ public static Function<RpcResult<UpdateMeterOutput>, RpcResult<AddMeterOutput>> createForAddMeterOutput() {
+ return new Function<RpcResult<UpdateMeterOutput>,RpcResult<AddMeterOutput>>() {
+
+ @Override
+ public RpcResult<AddMeterOutput> apply(final RpcResult<UpdateMeterOutput> input) {
+ UpdateMeterOutput updateMeterOutput = input.getResult();
+
+ AddMeterOutputBuilder addMeterOutput = new AddMeterOutputBuilder();
+ addMeterOutput.setTransactionId(updateMeterOutput.getTransactionId());
+ AddMeterOutput result = addMeterOutput.build();
+
+ RpcResult<AddMeterOutput> rpcResult = assembleRpcResult(input, result);
+ LOG.debug("Returning the Add Meter RPC result to MD-SAL");
+ return rpcResult;
+ }
+ };
+ }
+
+
+ /**
+ * @return return rpc result function
+ */
+ public static Function<RpcResult<UpdateMeterOutput>, RpcResult<RemoveMeterOutput>> createForRemoveMeterOutput() {
+ return new Function<RpcResult<UpdateMeterOutput>,RpcResult<RemoveMeterOutput>>() {
+
+ @Override
+ public RpcResult<RemoveMeterOutput> apply(final RpcResult<UpdateMeterOutput> input) {
+ UpdateMeterOutput updateMeterOutput = input.getResult();
+
+ RemoveMeterOutputBuilder removeMeterOutput = new RemoveMeterOutputBuilder();
+ removeMeterOutput.setTransactionId(updateMeterOutput.getTransactionId());
+ RemoveMeterOutput result = removeMeterOutput.build();
+
+ RpcResult<RemoveMeterOutput> rpcResult = assembleRpcResult(input, result);
+ LOG.debug("Returning the Remove Meter RPC result to MD-SAL");
+ return rpcResult;
+ }
+ };
+ }
+
+
+
+