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