Decouple config and netconf subsystems.
[controller.git] / opendaylight / netconf / netconf-util / src / main / java / org / opendaylight / controller / netconf / util / mapping / AbstractSingletonNetconfOperation.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.util.mapping;
9
10 import org.opendaylight.controller.config.util.xml.DocumentedException;
11 import org.opendaylight.controller.config.util.xml.XmlElement;
12 import org.opendaylight.controller.netconf.mapping.api.HandlingPriority;
13 import org.opendaylight.controller.netconf.mapping.api.NetconfOperationChainedExecution;
14 import org.w3c.dom.Document;
15 import org.w3c.dom.Element;
16
17 public abstract class AbstractSingletonNetconfOperation extends AbstractLastNetconfOperation {
18
19     protected AbstractSingletonNetconfOperation(String netconfSessionIdForReporting) {
20         super(netconfSessionIdForReporting);
21     }
22
23     @Override
24     protected Element handle(Document document, XmlElement operationElement,
25                              NetconfOperationChainedExecution subsequentOperation) throws DocumentedException {
26         return handleWithNoSubsequentOperations(document, operationElement);
27     }
28
29     @Override
30     protected HandlingPriority getHandlingPriority() {
31         return HandlingPriority.HANDLE_WITH_MAX_PRIORITY;
32     }
33
34 }