Deprecated getSessionContext() for removal
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / dom / api / DOMSchemaService.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.mdsal.dom.api;
9
10 import org.opendaylight.yangtools.concepts.ListenerRegistration;
11 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
12 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContextListener;
13
14 public interface DOMSchemaService extends DOMExtensibleService<DOMSchemaService, DOMSchemaServiceExtension> {
15     /**
16      * Returns session specific YANG schema context.
17      *
18      * @return schemaContext
19      * @deprecated This method never fully materialized, use {@link #getGlobalContext()} instead.
20      */
21     @Deprecated(forRemoval = true)
22     default EffectiveModelContext getSessionContext() {
23         throw new UnsupportedOperationException("getSessionContext() is not specified nor implemented");
24     }
25
26     /**
27      * Returns global schema context.
28      *
29      * @return schemaContext
30      */
31     EffectiveModelContext getGlobalContext();
32
33     /**
34      * Register a listener for changes in schema context.
35      *
36      * @param listener Listener which should be registered
37      * @return Listener registration handle
38      */
39     ListenerRegistration<EffectiveModelContextListener> registerSchemaContextListener(
40             EffectiveModelContextListener listener);
41 }