2 * Copyright (c) 2015 CableLabs and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.unimgr.command;
10 import java.util.List;
12 public class TransactionInvoker {
14 private Command command;
15 private List<Command> commands;
17 public void setCommand(Command command) {
18 this.command = command;
21 public void setCommands(List<Command> commands) {
22 this.commands = commands;
25 public void invoke() {
26 if (command != null) {
29 if (!commands.isEmpty()) {
30 for (Command invokableCommand: commands) {
31 invokableCommand.execute();