BUG-8327: Introduce DOMYangTextSourceProvider and implement it
[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 com.google.common.collect.ImmutableMap;
11 import java.util.Map;
12 import org.opendaylight.yangtools.concepts.ListenerRegistration;
13 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
14 import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
15
16 public interface DOMSchemaService extends DOMExtensibleService<DOMSchemaService, DOMSchemaServiceExtension> {
17     /**
18      * Returns session specific YANG schema context.
19      *
20      * @return schemaContext
21      */
22     SchemaContext getSessionContext();
23
24     /**
25      * Returns global schema context.
26      *
27      * @return schemaContext
28      */
29     SchemaContext getGlobalContext();
30
31     /**
32      * Register a listener for changes in schema context.
33      *
34      * @param listener Listener which should be registered
35      * @return Listener registration handle
36      */
37     ListenerRegistration<SchemaContextListener> registerSchemaContextListener(SchemaContextListener listener);
38
39     @Override
40     default Map<Class<? extends DOMSchemaServiceExtension>, DOMSchemaServiceExtension> getSupportedExtensions() {
41         return ImmutableMap.of();
42     }
43 }