import org.opendaylight.controller.md.sal.dom.api.DOMMountPoint;
import org.opendaylight.controller.md.sal.dom.api.DOMTransactionChain;
import org.opendaylight.restconf.common.context.InstanceIdentifierContext;
+import org.opendaylight.restconf.nb.rfc8040.handlers.TransactionChainHandler;
/**
* This class represent delegation wrapper for transaction variables.
private final DOMMountPoint mountPoint;
private LogicalDatastoreType configuration = null;
private final DOMTransactionChain transactionChain;
+ private final TransactionChainHandler transactionChainHandler;
/**
* Set base type of variables, which ones we need for transaction.
* {@link InstanceIdentifierContext} of data for transaction
* @param mountPoint
* mount point if is present
- * @param transactionChain
- * transaction chain for creating specific type of transaction
- * in specific operation
+ * @param transactionChainHandler
+ * used to obtain the transaction chain for creating specific type of transaction
+ * in specific operation
*/
public TransactionVarsWrapper(final InstanceIdentifierContext<?> instanceIdentifier, final DOMMountPoint mountPoint,
- final DOMTransactionChain transactionChain) {
+ final TransactionChainHandler transactionChainHandler) {
this.instanceIdentifier = instanceIdentifier;
this.mountPoint = mountPoint;
- this.transactionChain = transactionChain;
+ this.transactionChainHandler = transactionChainHandler;
+ transactionChain = transactionChainHandler.get();
}
/**
public DOMTransactionChain getTransactionChain() {
return this.transactionChain;
}
+
+ public TransactionChainHandler getTransactionChainHandler() {
+ return transactionChainHandler;
+ }
}