Merge changes Ic434bf4a,I05a3fb18,I47a3783d,I8234bbfd
[controller.git] / opendaylight / netconf / config-netconf-connector / src / main / java / org / opendaylight / controller / netconf / confignetconfconnector / osgi / YangStoreSnapshot.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.confignetconfconnector.osgi;
9
10 import java.util.Map;
11 import java.util.Set;
12 import org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.model.api.Module;
15 import org.opendaylight.yangtools.yang.model.api.ModuleIdentifier;
16
17 public interface YangStoreSnapshot extends AutoCloseable {
18
19     /**
20      * @deprecated Use {@link #getQNamesToIdentitiesToModuleMXBeanEntries()} instead. This method return only one
21      * module representation even if multiple revisions are available.
22      */
23     @Deprecated
24     Map<String/* Namespace from yang file */,
25             Map<String /* Name of module entry from yang file */, ModuleMXBeanEntry>> getModuleMXBeanEntryMap();
26
27
28     Map<QName, Map<String /* identity local name */, ModuleMXBeanEntry>> getQNamesToIdentitiesToModuleMXBeanEntries();
29
30     /**
31      * Get all modules discovered when this snapshot was created.
32      * @return all modules discovered. If one module exists with two different revisions, return both.
33      */
34     Set<Module> getModules();
35
36     String getModuleSource(ModuleIdentifier moduleIdentifier);
37
38     @Override
39     void close();
40 }