public class WebEngine extends Object implements ResourceLocator
Modifier and Type | Field and Description |
---|---|
protected AnnotationManager |
annoMgr |
protected HashMap<String,WebEngineModule> |
apps |
protected boolean |
devMode |
protected Map<String,Object> |
env |
protected boolean |
isDirty |
protected static Map<Object,Object> |
mimeTypes |
protected ModuleManager |
moduleMgr
moduleMgr use double-check idiom and needs to be volatile.
|
protected ResourceRegistry |
registry |
protected RenderingEngine |
rendering |
protected File |
root |
protected Scripting |
scripting |
static String |
SKIN_PATH_PREFIX_KEY |
protected String |
skinPathPrefix |
protected WebLoader |
webLoader |
Constructor and Description |
---|
WebEngine(File root) |
WebEngine(ResourceRegistry registry,
File root) |
Modifier and Type | Method and Description |
---|---|
void |
addApplication(WebEngineModule app) |
void |
addResourceBinding(ResourceBinding binding)
Deprecated.
resources are deprecated - you should use a jax-rs application to declare more resources.
|
void |
flushCache() |
static WebContext |
getActiveContext() |
AnnotationManager |
getAnnotationManager() |
WebEngineModule[] |
getApplications() |
ResourceBinding[] |
getBindings()
Deprecated.
resources are deprecated - you should use a jax-rs application to declare more resources.
|
File |
getDeploymentDirectory() |
Map<String,Object> |
getEnvironment() |
String |
getMimeType(String ext) |
Module |
getModule(String name,
WebContext context) |
protected ModuleConfiguration |
getModuleFromPath(String rootPath,
String path) |
ModuleManager |
getModuleManager() |
File |
getModulesDirectory() |
ResourceRegistry |
getRegistry()
Deprecated.
|
RenderingEngine |
getRendering() |
File |
getResourceFile(String key)
Get a file resource given a key
|
URL |
getResourceURL(String key)
Gets an URL resource given a key
|
File |
getRootDirectory() |
Scripting |
getScripting() |
String |
getSkinPathPrefix() |
WebLoader |
getWebLoader() |
void |
initJspRequestSupport(javax.servlet.GenericServlet servlet,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
boolean |
isDirty() |
Class<?> |
loadClass(String className) |
void |
loadJspTaglib(javax.servlet.GenericServlet servlet)
JSP taglib support
|
void |
registerRenderingExtension(String id,
Object obj) |
void |
reload()
Reloads configuration.
|
void |
reloadModules() |
void |
removeResourceBinding(ResourceBinding binding)
Deprecated.
resources are deprecated - you should use a jax-rs application to declare more resources.
|
void |
setDirty(boolean dirty) |
void |
setSkinPathPrefix(String skinPathPrefix) |
void |
start() |
void |
stop() |
boolean |
tryReload() |
void |
unregisterRenderingExtension(String id) |
public static final String SKIN_PATH_PREFIX_KEY
protected HashMap<String,WebEngineModule> apps
protected volatile ModuleManager moduleMgr
protected final RenderingEngine rendering
protected boolean devMode
protected final AnnotationManager annoMgr
protected final ResourceRegistry registry
protected String skinPathPrefix
protected volatile boolean isDirty
public WebEngine(ResourceRegistry registry, File root)
public static WebContext getActiveContext()
public void loadJspTaglib(javax.servlet.GenericServlet servlet)
public void initJspRequestSupport(javax.servlet.GenericServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
public WebLoader getWebLoader()
public void setSkinPathPrefix(String skinPathPrefix)
public String getSkinPathPrefix()
@Deprecated public ResourceRegistry getRegistry()
public Class<?> loadClass(String className) throws ClassNotFoundException
ClassNotFoundException
public String getMimeType(String ext)
public AnnotationManager getAnnotationManager()
public void registerRenderingExtension(String id, Object obj)
public void unregisterRenderingExtension(String id)
public Map<String,Object> getEnvironment()
public Scripting getScripting()
public WebEngineModule[] getApplications()
public void addApplication(WebEngineModule app)
public ModuleManager getModuleManager()
public Module getModule(String name, WebContext context)
public File getRootDirectory()
public File getDeploymentDirectory()
public File getModulesDirectory()
public RenderingEngine getRendering()
@Deprecated public void addResourceBinding(ResourceBinding binding)
@Deprecated public void removeResourceBinding(ResourceBinding binding)
@Deprecated public ResourceBinding[] getBindings()
public void setDirty(boolean dirty)
public boolean tryReload()
public boolean isDirty()
public void flushCache()
public void reload()
public void reloadModules()
public void start()
public void stop()
protected ModuleConfiguration getModuleFromPath(String rootPath, String path)
public URL getResourceURL(String key)
ResourceLocator
getResourceURL
in interface ResourceLocator
key
- the resource keypublic File getResourceFile(String key)
ResourceLocator
getResourceFile
in interface ResourceLocator
Copyright © 2019 Nuxeo. All rights reserved.