|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.module.ModuleRegistryImpl
@Singleton public class ModuleRegistryImpl
Keeps references to module descriptors and instances.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface info.magnolia.module.ModuleRegistry |
---|
ModuleRegistry.Factory |
Constructor Summary | |
---|---|
ModuleRegistryImpl()
|
Method Summary | ||
---|---|---|
ModuleDefinition |
getDefinition(String name)
|
|
List<ModuleDefinition> |
getModuleDefinitions()
Returns the list of known ModuleDefinitions, as ordered by the loading mechanism (typically in dependency order). |
|
|
getModuleInstance(Class<T> moduleClass)
Returns the module's instance. |
|
Object |
getModuleInstance(String name)
Returns the module's instance. |
|
Set<String> |
getModuleNames()
Returns the names of configured modules. |
|
ModuleVersionHandler |
getVersionHandler(String name)
|
|
boolean |
isModuleRegistered(String name)
|
|
void |
registerModuleDefinition(String name,
ModuleDefinition moduleDefinition)
|
|
void |
registerModuleInstance(String name,
Object moduleInstance)
|
|
void |
registerModuleVersionHandler(String name,
ModuleVersionHandler moduleVersionHandler)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ModuleRegistryImpl()
Method Detail |
---|
public void registerModuleDefinition(String name, ModuleDefinition moduleDefinition)
registerModuleDefinition
in interface ModuleRegistry
public void registerModuleInstance(String name, Object moduleInstance)
registerModuleInstance
in interface ModuleRegistry
public void registerModuleVersionHandler(String name, ModuleVersionHandler moduleVersionHandler)
registerModuleVersionHandler
in interface ModuleRegistry
public boolean isModuleRegistered(String name)
isModuleRegistered
in interface ModuleRegistry
public ModuleDefinition getDefinition(String name)
getDefinition
in interface ModuleRegistry
public Object getModuleInstance(String name)
ModuleRegistry
getModuleInstance
in interface ModuleRegistry
for a type-safer method to get module instances
public <T> T getModuleInstance(Class<T> moduleClass)
ModuleRegistry
getModuleInstance
in interface ModuleRegistry
public ModuleVersionHandler getVersionHandler(String name)
getVersionHandler
in interface ModuleRegistry
public Set<String> getModuleNames()
ModuleRegistry
getModuleNames
in interface ModuleRegistry
public List<ModuleDefinition> getModuleDefinitions()
ModuleRegistry
getModuleDefinitions
in interface ModuleRegistry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |