info.magnolia.module
Class ModuleRegistryImpl
java.lang.Object
info.magnolia.module.ModuleRegistryImpl
- All Implemented Interfaces:
- ModuleRegistry
public class ModuleRegistryImpl
- extends java.lang.Object
- implements ModuleRegistry
Keeps references to module descriptors and instances.
- Version:
- $Id: ModuleRegistryImpl.java 32667 2010-03-13 00:37:06Z 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(java.lang.String name,
ModuleDefinition moduleDefinition)
- Specified by:
registerModuleDefinition
in interface ModuleRegistry
registerModuleInstance
public void registerModuleInstance(java.lang.String name,
java.lang.Object moduleInstance)
- Specified by:
registerModuleInstance
in interface ModuleRegistry
registerModuleVersionHandler
public void registerModuleVersionHandler(java.lang.String name,
ModuleVersionHandler moduleVersionHandler)
- Specified by:
registerModuleVersionHandler
in interface ModuleRegistry
isModuleRegistered
public boolean isModuleRegistered(java.lang.String name)
- Specified by:
isModuleRegistered
in interface ModuleRegistry
getDefinition
public ModuleDefinition getDefinition(java.lang.String name)
- Specified by:
getDefinition
in interface ModuleRegistry
getModuleInstance
public java.lang.Object getModuleInstance(java.lang.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(java.lang.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(java.lang.String name)
- Specified by:
getVersionHandler
in interface ModuleRegistry
getModuleNames
public java.util.Set<java.lang.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-2010 Magnolia International Ltd.. All Rights Reserved.