Class WebEngine

java.lang.Object
org.nuxeo.ecm.webengine.WebEngine
All Implemented Interfaces:
ResourceLocator

public class WebEngine extends Object implements ResourceLocator
Author:
Bogdan Stefanescu
  • Field Details

    • SKIN_PATH_PREFIX_KEY

      public static final String SKIN_PATH_PREFIX_KEY
      See Also:
    • mimeTypes

      protected static final Map<Object,Object> mimeTypes
    • root

      protected final File root
    • apps

      protected HashMap<String,WebEngineModule> apps
    • moduleMgr

      protected volatile ModuleManager moduleMgr
      moduleMgr use double-check idiom and needs to be volatile. See http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html
    • scripting

      protected final Scripting scripting
    • rendering

      protected final RenderingEngine rendering
    • env

      protected final Map<String,Object> env
    • devMode

      protected boolean devMode
    • annoMgr

      protected final AnnotationManager annoMgr
    • registry

      protected final ResourceRegistry registry
    • skinPathPrefix

      protected String skinPathPrefix
    • webLoader

      protected final WebLoader webLoader
    • isDirty

      protected volatile boolean isDirty
  • Constructor Details

  • Method Details

    • getActiveContext

      public static WebContext getActiveContext()
    • loadJspTaglib

      public void loadJspTaglib(javax.servlet.GenericServlet servlet)
      JSP taglib support
    • initJspRequestSupport

      public void initJspRequestSupport(javax.servlet.GenericServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
    • getWebLoader

      public WebLoader getWebLoader()
    • setSkinPathPrefix

      public void setSkinPathPrefix(String skinPathPrefix)
    • getSkinPathPrefix

      public String getSkinPathPrefix()
    • getRegistry

      @Deprecated public ResourceRegistry getRegistry()
      Deprecated.
    • loadClass

      public Class<?> loadClass(String className) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • getMimeType

      public String getMimeType(String ext)
    • getAnnotationManager

      public AnnotationManager getAnnotationManager()
    • registerRenderingExtension

      public void registerRenderingExtension(String id, Object obj)
    • unregisterRenderingExtension

      public void unregisterRenderingExtension(String id)
    • getEnvironment

      public Map<String,Object> getEnvironment()
    • getScripting

      public Scripting getScripting()
    • getApplications

      public WebEngineModule[] getApplications()
    • addApplication

      public void addApplication(WebEngineModule app)
    • getModuleManager

      public ModuleManager getModuleManager()
    • getModule

      public Module getModule(String name, WebContext context)
    • getRootDirectory

      public File getRootDirectory()
    • getDeploymentDirectory

      public File getDeploymentDirectory()
    • getModulesDirectory

      public File getModulesDirectory()
    • getRendering

      public RenderingEngine getRendering()
    • addResourceBinding

      @Deprecated public void addResourceBinding(ResourceBinding binding)
      Deprecated.
      resources are deprecated - you should use a jax-rs application to declare more resources.
      Manage jax-rs root resource bindings
    • removeResourceBinding

      @Deprecated public void removeResourceBinding(ResourceBinding binding)
      Deprecated.
      resources are deprecated - you should use a jax-rs application to declare more resources.
    • getBindings

      @Deprecated public ResourceBinding[] getBindings()
      Deprecated.
      resources are deprecated - you should use a jax-rs application to declare more resources.
    • setDirty

      public void setDirty(boolean dirty)
    • tryReload

      public boolean tryReload()
    • isDirty

      public boolean isDirty()
    • flushCache

      public void flushCache()
    • reload

      public void reload()
      Reloads configuration.
    • reloadModules

      public void reloadModules()
    • start

      public void start()
    • stop

      public void stop()
    • getModuleFromPath

      protected ModuleConfiguration getModuleFromPath(String rootPath, String path)
    • getResourceURL

      public URL getResourceURL(String key)
      Description copied from interface: ResourceLocator
      Gets an URL resource given a key
      Specified by:
      getResourceURL in interface ResourceLocator
      Parameters:
      key - the resource key
      Returns:
      the resource URL or null if no such result was found
    • getResourceFile

      public File getResourceFile(String key)
      Description copied from interface: ResourceLocator
      Get a file resource given a key
      Specified by:
      getResourceFile in interface ResourceLocator