public class ArchiveModuleRegistry extends java.lang.Object implements ModuleRegistry, org.springframework.context.ResourceLoaderAware
<registry root>/<module type>/<archive named after the module>.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ARCHIVE_AS_FILE_EXTENSION
The extension the module 'File' must have if it's not in exploded dir format.
|
protected org.springframework.core.io.support.ResourcePatternResolver |
resolver |
protected java.lang.String |
root |
| Constructor and Description |
|---|
ArchiveModuleRegistry(java.lang.String root) |
| Modifier and Type | Method and Description |
|---|---|
ModuleDefinition |
findDefinition(java.lang.String name,
ModuleType moduleType)
Lookup a module of the given type with the given name.
|
java.util.List<ModuleDefinition> |
findDefinitions()
Returns all module definitions.
|
java.util.List<ModuleDefinition> |
findDefinitions(ModuleType type)
Searches the registry for the type specified and returns all module definitions that match the type.
|
java.util.List<ModuleDefinition> |
findDefinitions(java.lang.String name)
Searches the registry for the name specified and returns all module definitions that match the name regardless of
module type.
|
protected void |
fromResource(org.springframework.core.io.Resource resource,
java.util.List<ModuleDefinition> holder) |
protected org.springframework.core.io.Resource[] |
getResources(java.lang.String moduleType,
java.lang.String moduleName,
java.lang.String suffix) |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader) |
public static final java.lang.String ARCHIVE_AS_FILE_EXTENSION
protected final java.lang.String root
protected org.springframework.core.io.support.ResourcePatternResolver resolver
public ModuleDefinition findDefinition(java.lang.String name, ModuleType moduleType)
ModuleRegistryfindDefinition in interface ModuleRegistrynull if this registry does not have such a modulepublic java.util.List<ModuleDefinition> findDefinitions(java.lang.String name)
ModuleRegistryfindDefinitions in interface ModuleRegistryname - The module definition name to be searched.public java.util.List<ModuleDefinition> findDefinitions(ModuleType type)
ModuleRegistryfindDefinitions in interface ModuleRegistrytype - The module type name to be searched.public java.util.List<ModuleDefinition> findDefinitions()
ModuleRegistryfindDefinitions in interface ModuleRegistryprotected void fromResource(org.springframework.core.io.Resource resource,
java.util.List<ModuleDefinition> holder)
throws java.io.IOException
java.io.IOExceptionpublic void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
setResourceLoader in interface org.springframework.context.ResourceLoaderAwareprotected org.springframework.core.io.Resource[] getResources(java.lang.String moduleType,
java.lang.String moduleName,
java.lang.String suffix)
throws java.io.IOException
java.io.IOException