2 * Copyright (c) 2014 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
9 package org.opendaylight.netconf.test.tool.rpc;
11 import com.google.common.base.Optional;
12 import org.opendaylight.netconf.api.DocumentedException;
13 import org.opendaylight.netconf.api.xml.XmlElement;
14 import org.opendaylight.netconf.api.xml.XmlNetconfConstants;
15 import org.opendaylight.netconf.api.xml.XmlUtil;
16 import org.opendaylight.netconf.util.mapping.AbstractLastNetconfOperation;
17 import org.w3c.dom.Document;
18 import org.w3c.dom.Element;
20 public class SimulatedCommit extends AbstractLastNetconfOperation {
22 public SimulatedCommit(final String netconfSessionIdForReporting) {
23 super(netconfSessionIdForReporting);
27 protected Element handleWithNoSubsequentOperations(final Document document, final XmlElement operationElement)
28 throws DocumentedException {
29 return XmlUtil.createElement(document, XmlNetconfConstants.OK, Optional.absent());
33 protected String getOperationName() {
34 return XmlNetconfConstants.COMMIT;