Split Restconf implementations (draft02 and RFC) - move
[netconf.git] / restconf / restconf-nb-bierman02 / src / main / java / org / opendaylight / restconf / handlers / TransactionChainHandler.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
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
9 package org.opendaylight.restconf.handlers;
10
11 import com.google.common.base.Preconditions;
12 import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain;
13
14
15 /**
16  * Implementation of {@link TransactionChainHandler}.
17  *
18  * @deprecated move to splitted module restconf-nb-rfc8040
19  */
20 @Deprecated
21 public class TransactionChainHandler implements Handler<DOMTransactionChain> {
22
23     private DOMTransactionChain transactionChain;
24
25     /**
26      * Prepare transaction chain service for Restconf services.
27      *
28      * @param transactionChain Transaction chain
29      */
30     public TransactionChainHandler(final DOMTransactionChain transactionChain) {
31         Preconditions.checkNotNull(transactionChain);
32         this.transactionChain = transactionChain;
33     }
34
35     @Override
36     public void update(final DOMTransactionChain transactionChain) {
37         Preconditions.checkNotNull(transactionChain);
38         this.transactionChain = transactionChain;
39     }
40
41     @Override
42     public DOMTransactionChain get() {
43         return this.transactionChain;
44     }
45 }