Merge "Take advantage of MultipartTransactionAware"
[controller.git] / opendaylight / netconf / netconf-impl / src / main / java / org / opendaylight / controller / netconf / impl / mapping / operations / DefaultStopExi.java
1 /*\r
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 package org.opendaylight.controller.netconf.impl.mapping.operations;\r
9 \r
10 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;\r
11 import org.opendaylight.controller.netconf.api.NetconfSession;\r
12 import org.opendaylight.controller.netconf.mapping.api.DefaultNetconfOperation;\r
13 import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation;\r
14 import org.opendaylight.controller.netconf.util.xml.XmlElement;\r
15 import org.slf4j.Logger;\r
16 import org.slf4j.LoggerFactory;\r
17 import org.w3c.dom.Document;\r
18 import org.w3c.dom.Element;\r
19 \r
20 public class DefaultStopExi extends AbstractSingletonNetconfOperation implements DefaultNetconfOperation {\r
21 \r
22     public static final String STOP_EXI = "stop-exi";\r
23     private NetconfSession netconfSession;\r
24 \r
25     private static final Logger logger = LoggerFactory\r
26             .getLogger(DefaultStartExi.class);\r
27 \r
28     public DefaultStopExi(String netconfSessionIdForReporting) {\r
29         super(netconfSessionIdForReporting);\r
30     }\r
31 \r
32     @Override\r
33     protected String getOperationName() {\r
34         return STOP_EXI;\r
35     }\r
36 \r
37     @Override\r
38     protected Element handleWithNoSubsequentOperations(Document document, XmlElement operationElement)\r
39             throws NetconfDocumentedException {\r
40         throw new UnsupportedOperationException("Not implemented");\r
41         /*\r
42         netconfSession.remove(ExiDecoderHandler.class);\r
43         netconfSession.removeAfterMessageSent(ExiEncoderHandler.HANDLER_NAME);\r
44 \r
45         Element getSchemaResult = document.createElement(XmlNetconfConstants.OK);\r
46         XmlUtil.addNamespaceAttr(getSchemaResult,\r
47                 XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);\r
48         logger.trace("{} operation successful", STOP_EXI);\r
49         logger.debug("received stop-exi message {} ", XmlUtil.toString(document));\r
50         return getSchemaResult;\r
51         */\r
52     }\r
53 \r
54     @Override\r
55     public void setNetconfSession(NetconfSession s) {\r
56         this.netconfSession = s;\r
57     }\r
58 \r
59     public NetconfSession getNetconfSession() {\r
60         return netconfSession;\r
61     }\r
62 }\r