Resolve Bug:745 - remove windows line endings from config and netconf.
[controller.git] / opendaylight / netconf / netconf-impl / src / main / java / org / opendaylight / controller / netconf / impl / mapping / operations / DefaultStopExi.java
1 /*
2  * Copyright (c) 2013 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 package org.opendaylight.controller.netconf.impl.mapping.operations;
9
10 import org.opendaylight.controller.netconf.api.NetconfDocumentedException;
11 import org.opendaylight.controller.netconf.api.NetconfSession;
12 import org.opendaylight.controller.netconf.mapping.api.DefaultNetconfOperation;
13 import org.opendaylight.controller.netconf.util.mapping.AbstractSingletonNetconfOperation;
14 import org.opendaylight.controller.netconf.util.xml.XmlElement;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
17 import org.w3c.dom.Document;
18 import org.w3c.dom.Element;
19
20 public class DefaultStopExi extends AbstractSingletonNetconfOperation implements DefaultNetconfOperation {
21
22     public static final String STOP_EXI = "stop-exi";
23     private NetconfSession netconfSession;
24
25     private static final Logger logger = LoggerFactory
26             .getLogger(DefaultStartExi.class);
27
28     public DefaultStopExi(String netconfSessionIdForReporting) {
29         super(netconfSessionIdForReporting);
30     }
31
32     @Override
33     protected String getOperationName() {
34         return STOP_EXI;
35     }
36
37     @Override
38     protected Element handleWithNoSubsequentOperations(Document document, XmlElement operationElement)
39             throws NetconfDocumentedException {
40         throw new UnsupportedOperationException("Not implemented");
41         /*
42         netconfSession.remove(ExiDecoderHandler.class);
43         netconfSession.removeAfterMessageSent(ExiEncoderHandler.HANDLER_NAME);
44
45         Element getSchemaResult = document.createElement(XmlNetconfConstants.OK);
46         XmlUtil.addNamespaceAttr(getSchemaResult,
47                 XmlNetconfConstants.URN_IETF_PARAMS_XML_NS_NETCONF_BASE_1_0);
48         logger.trace("{} operation successful", STOP_EXI);
49         logger.debug("received stop-exi message {} ", XmlUtil.toString(document));
50         return getSchemaResult;
51         */
52     }
53
54     @Override
55     public void setNetconfSession(NetconfSession s) {
56         this.netconfSession = s;
57     }
58
59     public NetconfSession getNetconfSession() {
60         return netconfSession;
61     }
62 }