2 * Copyright (c) 2016 Cisco Systems, Inc. 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.restconf.restful.transaction;
10 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
11 import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
12 import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain;
13 import org.opendaylight.restconf.common.context.InstanceIdentifierContext;
16 * This class represent delegation wrapper for transaction variables.
18 * @deprecated move to splitted module restconf-nb-rfc8040
21 public final class TransactionVarsWrapper {
23 private final InstanceIdentifierContext<?> instanceIdentifier;
24 private final DOMMountPoint mountPoint;
25 private LogicalDatastoreType configuration = null;
26 private final DOMTransactionChain transactionChain;
29 * Set base type of variables, which ones we need for transaction.
30 * {@link LogicalDatastoreType} is default set to null (to read all data
31 * from DS - config + state).
33 * @param instanceIdentifier
34 * {@link InstanceIdentifierContext} of data for transaction
36 * mount point if is present
37 * @param transactionChain
38 * transaction chain for creating specific type of transaction
39 * in specific operation
41 public TransactionVarsWrapper(final InstanceIdentifierContext<?> instanceIdentifier, final DOMMountPoint mountPoint,
42 final DOMTransactionChain transactionChain) {
43 this.instanceIdentifier = instanceIdentifier;
44 this.mountPoint = mountPoint;
45 this.transactionChain = transactionChain;
49 * Get instance identifier of data.
51 * @return {@link InstanceIdentifierContext}
53 public InstanceIdentifierContext<?> getInstanceIdentifier() {
54 return this.instanceIdentifier;
60 * @return {@link DOMMountPoint}
62 public DOMMountPoint getMountPoint() {
63 return this.mountPoint;
67 * Set {@link LogicalDatastoreType} of data for transaction.
69 * @param configuration
70 * {@link LogicalDatastoreType}
72 public void setLogicalDatastoreType(final LogicalDatastoreType configuration) {
73 this.configuration = configuration;
80 * @return {@link LogicalDatastoreType}
82 public LogicalDatastoreType getLogicalDatastoreType() {
83 return this.configuration;
87 * Get transaction chain for creating specific transaction for specific
90 * @return transaction chain
92 public DOMTransactionChain getTransactionChain() {
93 return this.transactionChain;