Added more ignorable files to .gitignore
[ovsdb.git] / ovsdb / src / main / java / org / opendaylight / ovsdb / lib / message / TransactBuilder.java
1 /*
2  * Copyright (C) 2013 EBay Software Foundation
3  *
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
7  *
8  * Authors : Ashwin Raveendran, Madhu Venugopal
9  */
10 package org.opendaylight.ovsdb.lib.message;
11
12 import com.google.common.collect.Lists;
13
14 import org.opendaylight.ovsdb.lib.jsonrpc.Params;
15 import org.opendaylight.ovsdb.lib.operations.Operation;
16 import java.util.List;
17
18 public class TransactBuilder implements Params {
19
20     List<Operation> requests = Lists.newArrayList();
21
22     public List<Operation> getRequests() {
23         return requests;
24     }
25
26     @Override
27     public List<Object> params() {
28         List<Object> lists = Lists.newArrayList((Object)"Open_vSwitch");
29         lists.addAll(requests);
30         return lists;
31     }
32
33     public void addOperations (List<Operation> o) {
34         requests.addAll(o);
35     }
36
37     public void addOperation (Operation o) {
38         requests.add(o);
39     }
40 }