+
+ def findModuleByName(String moduleName) {
+ checkPreconditions
+ checkArgument(moduleName !== null && !moduleName.empty)
+ return globalSchema.getLatestModule(moduleName)
+ }
+
+ def findModuleByName(String moduleName, InstanceIdentifier partialPath) {
+ checkArgument(moduleName !== null && !moduleName.empty && partialPath !== null && !partialPath.path.empty)
+ val mountPointSchema = mountService?.getMountPoint(partialPath)?.schemaContext;
+ return mountPointSchema?.getLatestModule(moduleName);
+ }
+
+ def findModuleByNamespace(URI namespace) {
+ checkPreconditions
+ val moduleSchemas = globalSchema.findModuleByNamespace(namespace)
+ return moduleSchemas?.filterLatestModule
+ }
+
+ def findModuleByNamespace(URI namespace, InstanceIdentifier partialPath) {
+ checkArgument(namespace !== null && !namespace.toString.empty && partialPath !== null && !partialPath.path.empty)
+ val mountPointSchema = mountService?.getMountPoint(partialPath)?.schemaContext;
+ val moduleSchemas = mountPointSchema?.findModuleByNamespace(namespace)
+ return moduleSchemas?.filterLatestModule
+ }