X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fconfig%2Fyang-store-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fconfig%2Fyang%2Fstore%2Fapi%2FYangStoreSnapshot.java;h=b912b0c7af90c8ef43e64bd0873e766ea4c4b9a2;hb=9070e358923aca6229137d46f9cae7ff458204dd;hp=40daf4018aee8e1597391a19ebb763cbd50337e0;hpb=9fb64948564e252018f9b1e13e7cea2c92f991aa;p=controller.git diff --git a/opendaylight/config/yang-store-api/src/main/java/org/opendaylight/controller/config/yang/store/api/YangStoreSnapshot.java b/opendaylight/config/yang-store-api/src/main/java/org/opendaylight/controller/config/yang/store/api/YangStoreSnapshot.java index 40daf4018a..b912b0c7af 100644 --- a/opendaylight/config/yang-store-api/src/main/java/org/opendaylight/controller/config/yang/store/api/YangStoreSnapshot.java +++ b/opendaylight/config/yang-store-api/src/main/java/org/opendaylight/controller/config/yang/store/api/YangStoreSnapshot.java @@ -7,20 +7,50 @@ */ package org.opendaylight.controller.config.yang.store.api; -import java.util.Map; -import java.util.Map.Entry; - import org.opendaylight.controller.config.yangjmxgenerator.ModuleMXBeanEntry; +import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.model.api.Module; +import java.util.Map; +import java.util.Set; + public interface YangStoreSnapshot extends AutoCloseable { - Map> getModuleMXBeanEntryMap(); + /** + * @deprecated Use {@link #getQNamesToIdentitiesToModuleMXBeanEntries()} instead. This method return only one + * module representation even if multiple revisions are available. + */ + @Deprecated + Map> getModuleMXBeanEntryMap(); - Map> getModuleMap(); + Map> getQNamesToIdentitiesToModuleMXBeanEntries(); + + /** + * Get number of parsed ModuleMXBeanEntry instances. + */ int countModuleMXBeanEntries(); + /** + * Get all modules discovered when this snapshot was created. + * @return all modules discovered. If one module exists with two different revisions, return both. + */ + Set getModules(); + + /** + * Get all modules together with their yang sources. + */ + Map getModulesToSources(); + + /** + * Retrieve source of module as it appeared during creation of this snapshot. + * @param module + * @return yang source of given module + * @throws java.lang.IllegalArgumentException if module does not belong to this snapshot + */ + String getModuleSource(Module module); + @Override void close(); }