Class ModuleManager
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.impl.ModuleManager
-
public class ModuleManager extends Object
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected WebEngine
engine
protected Map<String,ModuleConfiguration>
modules
protected Map<String,ModuleConfiguration>
paths
protected Map<String,ModuleConfiguration>
roots
-
Constructor Summary
Constructors Constructor Description ModuleManager(WebEngine engine)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(String name, String path)
protected static Context
createXMapContext(WebEngine engine)
ModuleConfiguration
getModule(String key)
Gets a module given its name.ModuleConfiguration
getModuleByConfigFile(File file)
ModuleConfiguration
getModuleByPath(String path)
ModuleConfiguration
getModuleByRootClass(Class<?> clazz)
ModuleConfiguration[]
getModules()
ModuleConfiguration
getRootModule()
protected ModuleConfiguration
loadConfiguration(File file)
void
loadModule(File file)
void
loadModule(ModuleConfiguration mc)
void
loadModuleFromDir(File moduleRoot)
void
loadModuleRootResources(ModuleConfiguration mc)
void
loadModules(File root)
static ModuleConfiguration
readConfiguration(WebEngine engine, File file)
void
registerModule(ModuleConfiguration descriptor)
void
reloadModule(String name)
void
reloadModules()
File
unregisterModule(String name)
-
-
-
Field Detail
-
modules
protected final Map<String,ModuleConfiguration> modules
-
paths
protected final Map<String,ModuleConfiguration> paths
-
roots
protected final Map<String,ModuleConfiguration> roots
-
engine
protected WebEngine engine
-
-
Constructor Detail
-
ModuleManager
public ModuleManager(WebEngine engine)
-
-
Method Detail
-
getModule
public ModuleConfiguration getModule(String key)
Gets a module given its name.- Returns:
- the module or null if none
-
getModuleByPath
public ModuleConfiguration getModuleByPath(String path)
-
getRootModule
public ModuleConfiguration getRootModule()
-
getModules
public ModuleConfiguration[] getModules()
-
getModuleByConfigFile
public ModuleConfiguration getModuleByConfigFile(File file)
-
registerModule
public void registerModule(ModuleConfiguration descriptor)
-
getModuleByRootClass
public ModuleConfiguration getModuleByRootClass(Class<?> clazz)
-
loadModules
public void loadModules(File root)
-
loadModule
public void loadModule(ModuleConfiguration mc)
-
loadModule
public void loadModule(File file)
-
loadModuleFromDir
public void loadModuleFromDir(File moduleRoot)
-
reloadModule
public void reloadModule(String name)
-
reloadModules
public void reloadModules()
-
loadConfiguration
protected ModuleConfiguration loadConfiguration(File file)
-
readConfiguration
public static ModuleConfiguration readConfiguration(WebEngine engine, File file) throws IOException
- Throws:
IOException
-
loadModuleRootResources
public void loadModuleRootResources(ModuleConfiguration mc)
-
-