info.magnolia.module
Class ModuleRegistryImpl
java.lang.Object
info.magnolia.module.ModuleRegistryImpl
- All Implemented Interfaces:
- ModuleRegistry
public class ModuleRegistryImpl
- extends Object
- implements ModuleRegistry
Keeps references to module descriptors and instances.
- Version:
- $Id: ModuleRegistryImpl.java 41137 2011-01-06 18:19:25Z gjoseph $
- Author:
- philipp
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModuleRegistryImpl
public ModuleRegistryImpl()
registerModuleDefinition
public void registerModuleDefinition(String name,
ModuleDefinition moduleDefinition)
- Specified by:
registerModuleDefinition
in interface ModuleRegistry
registerModuleInstance
public void registerModuleInstance(String name,
Object moduleInstance)
- Specified by:
registerModuleInstance
in interface ModuleRegistry
registerModuleVersionHandler
public void registerModuleVersionHandler(String name,
ModuleVersionHandler moduleVersionHandler)
- Specified by:
registerModuleVersionHandler
in interface ModuleRegistry
isModuleRegistered
public boolean isModuleRegistered(String name)
- Specified by:
isModuleRegistered
in interface ModuleRegistry
getDefinition
public ModuleDefinition getDefinition(String name)
- Specified by:
getDefinition
in interface ModuleRegistry
getModuleInstance
public Object getModuleInstance(String name)
- Description copied from interface:
ModuleRegistry
- Returns the module's instance. This is useful for modules which use a common class (i.e content or theme modules, which
can typically co-exist in a system and have the same module class).
- Specified by:
getModuleInstance
in interface ModuleRegistry
- See Also:
for a type-safer method to get module instances
getModuleInstance
public <T> T getModuleInstance(Class<T> moduleClass)
- Description copied from interface:
ModuleRegistry
- Returns the module's instance. This is useful for modules of known type.
- Specified by:
getModuleInstance
in interface ModuleRegistry
getVersionHandler
public ModuleVersionHandler getVersionHandler(String name)
- Specified by:
getVersionHandler
in interface ModuleRegistry
getModuleNames
public Set<String> getModuleNames()
- Description copied from interface:
ModuleRegistry
- Returns the names of configured modules.
- Specified by:
getModuleNames
in interface ModuleRegistry
- Returns:
- unmodifiable set of module names
Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.