Search in sources :

Example 11 with ModuleDefinition

use of org.apache.cloudstack.spring.module.model.ModuleDefinition in project cloudstack by apache.

the class ClasspathModuleDefinitionLocator method locateModules.

@Override
public Collection<ModuleDefinition> locateModules(String context) throws IOException {
    ResourcePatternResolver resolver = getResolver();
    Map<String, ModuleDefinition> allModules = discoverModules(context, resolver);
    return allModules.values();
}
Also used : DefaultModuleDefinition(org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinition) ModuleDefinition(org.apache.cloudstack.spring.module.model.ModuleDefinition) PathMatchingResourcePatternResolver(org.springframework.core.io.support.PathMatchingResourcePatternResolver) ResourcePatternResolver(org.springframework.core.io.support.ResourcePatternResolver)

Aggregations

ModuleDefinition (org.apache.cloudstack.spring.module.model.ModuleDefinition)11 Resource (org.springframework.core.io.Resource)4 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 ResourceApplicationContext (org.apache.cloudstack.spring.module.context.ResourceApplicationContext)2 DefaultModuleDefinition (org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinition)2 UrlResource (org.springframework.core.io.UrlResource)2 IOException (java.io.IOException)1 URL (java.net.URL)1 LinkedHashSet (java.util.LinkedHashSet)1 List (java.util.List)1 DefaultModuleDefinitionSet (org.apache.cloudstack.spring.module.model.impl.DefaultModuleDefinitionSet)1 ApplicationContext (org.springframework.context.ApplicationContext)1 PathMatchingResourcePatternResolver (org.springframework.core.io.support.PathMatchingResourcePatternResolver)1 ResourcePatternResolver (org.springframework.core.io.support.ResourcePatternResolver)1