public class ModuleManager extends Object
Modifier and Type | Field and Description |
---|---|
protected WebEngine |
engine |
protected Map<String,ModuleConfiguration> |
modules |
protected Map<String,ModuleConfiguration> |
paths |
protected Map<String,ModuleConfiguration> |
roots |
Constructor and Description |
---|
ModuleManager(WebEngine engine) |
Modifier and Type | Method and 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) |
protected final Map<String,ModuleConfiguration> modules
protected final Map<String,ModuleConfiguration> paths
protected final Map<String,ModuleConfiguration> roots
public ModuleManager(WebEngine engine)
public ModuleConfiguration getModule(String key)
public ModuleConfiguration getModuleByPath(String path)
public ModuleConfiguration getRootModule()
public ModuleConfiguration[] getModules()
public ModuleConfiguration getModuleByConfigFile(File file)
public void registerModule(ModuleConfiguration descriptor)
public File unregisterModule(String name)
public ModuleConfiguration getModuleByRootClass(Class<?> clazz)
public void loadModules(File root)
public void loadModule(ModuleConfiguration mc)
public void loadModule(File file)
public void loadModuleFromDir(File moduleRoot)
public void reloadModule(String name)
public void reloadModules()
protected ModuleConfiguration loadConfiguration(File file)
public static ModuleConfiguration readConfiguration(WebEngine engine, File file) throws IOException
IOException
public void loadModuleRootResources(ModuleConfiguration mc)
protected static Context createXMapContext(WebEngine engine)
Copyright © 2016 Nuxeo SA. All rights reserved.