public abstract class AbstractModuleRegistry extends java.lang.Object implements ModuleRegistry
ModuleRegistry
and knows how to handle custom classpath population for storages
that support it.Constructor and Description |
---|
AbstractModuleRegistry() |
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 abstract java.lang.String |
inferModuleName(org.springframework.core.io.Resource resource)
Recover the name of the module, given its resource location.
|
protected abstract org.springframework.core.io.Resource |
locateApplicationContext(java.lang.String name,
ModuleType type)
Return a resource pointing to an
ApplicationContext XML definition file. |
protected abstract java.util.List<org.springframework.core.io.Resource> |
locateApplicationContexts(ModuleType type)
Return a list of resources pointing to
ApplicationContext XML definition files. |
protected java.net.URL[] |
maybeLocateClasspath(org.springframework.core.io.Resource resource,
java.lang.String name,
ModuleType moduleType)
Return an array of jar files locations or
null if the module is a plain xml file. |
public ModuleDefinition findDefinition(java.lang.String name, ModuleType moduleType)
ModuleRegistry
findDefinition
in interface ModuleRegistry
null
if this registry does not have such a modulepublic java.util.List<ModuleDefinition> findDefinitions(java.lang.String name)
ModuleRegistry
findDefinitions
in interface ModuleRegistry
name
- The module definition name to be searched.public java.util.List<ModuleDefinition> findDefinitions(ModuleType type)
ModuleRegistry
findDefinitions
in interface ModuleRegistry
type
- The module type name to be searched.protected abstract java.lang.String inferModuleName(org.springframework.core.io.Resource resource)
public java.util.List<ModuleDefinition> findDefinitions()
ModuleRegistry
findDefinitions
in interface ModuleRegistry
protected abstract org.springframework.core.io.Resource locateApplicationContext(java.lang.String name, ModuleType type)
ApplicationContext
XML definition file.protected abstract java.util.List<org.springframework.core.io.Resource> locateApplicationContexts(ModuleType type)
ApplicationContext
XML definition files.protected java.net.URL[] maybeLocateClasspath(org.springframework.core.io.Resource resource, java.lang.String name, ModuleType moduleType)
null
if the module is a plain xml file. Default implementation
returns null
system.