use of org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinition in project cloudstack by apache.
the class ClasspathModuleDefinitionLocator method discoverModules.
protected Map<String, ModuleDefinition> discoverModules(String baseDir, ResourcePatternResolver resolver) throws IOException {
Map<String, ModuleDefinition> result = new HashMap<String, ModuleDefinition>();
for (Resource r : resolver.getResources(ModuleLocationUtils.getModulesLocation(baseDir))) {
DefaultModuleDefinition def = new DefaultModuleDefinition(baseDir, r, resolver);
def.init();
if (def.isValid())
result.put(def.getName(), def);
}
return result;
}
Aggregations