a56a468e20334d91d8c93750c048d7504a9a1db5
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / sal / core / api / model / SchemaService.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.sal.core.api.model;
9
10 import org.opendaylight.controller.sal.core.api.BrokerService;
11 import org.opendaylight.mdsal.dom.api.DOMSchemaService;
12 import org.opendaylight.yangtools.concepts.ListenerRegistration;
13 import org.opendaylight.yangtools.yang.model.api.Module;
14 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
15 import org.opendaylight.yangtools.yang.model.api.SchemaContextListener;
16
17 /**
18  * @deprecated Use {@link DOMSchemaService} instead.
19  */
20 @Deprecated
21 public interface SchemaService extends BrokerService, DOMSchemaService {
22
23     /**
24      * Registers a YANG module to session and global context
25      */
26     void addModule(Module module);
27
28     /**
29      * Unregisters a YANG module from session context
30      */
31     void removeModule(Module module);
32
33     /**
34      * Returns session specific YANG schema context
35      */
36     @Override
37     SchemaContext getSessionContext();
38
39     /**
40      * Returns global schema context
41      */
42     @Override
43     SchemaContext getGlobalContext();
44
45     /**
46      * Register a listener for changes in schema context.
47      *
48      * @param listener Listener which should be registered
49      * @return Listener registration handle
50      */
51     @Override
52     ListenerRegistration<SchemaContextListener> registerSchemaContextListener(SchemaContextListener listener);
53 }