Class WebAppStartupListener

java.lang.Object
org.apache.empire.jsf2.app.WebAppStartupListener
All Implemented Interfaces:
EventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListener

public class WebAppStartupListener extends Object implements javax.faces.event.SystemEventListener
  • Constructor Details

    • WebAppStartupListener

      public WebAppStartupListener()
      Default Constructor with no initialization
    • WebAppStartupListener

      public WebAppStartupListener(Class<? extends FacesConfiguration> facesConfigClass)
      Default Constructor with additional configuration
      Parameters:
      facesConfigClass - the faces configuration
  • Method Details

    • getFacesImplementation

      public FacesImplementation getFacesImplementation()
    • getServletContext

      protected javax.servlet.ServletContext getServletContext(javax.faces.context.FacesContext startupContext)
    • isListenerForSource

      public boolean isListenerForSource(Object source)
      Specified by:
      isListenerForSource in interface javax.faces.event.SystemEventListener
    • processEvent

      public void processEvent(javax.faces.event.SystemEvent event) throws javax.faces.event.AbortProcessingException
      Specified by:
      processEvent in interface javax.faces.event.SystemEventListener
      Throws:
      javax.faces.event.AbortProcessingException
    • detectFacesImplementation

      protected FacesImplementation detectFacesImplementation(javax.faces.context.ExternalContext externalContext)
      Detects the JSF Implementation and returns an implmentation handler class. Supported Implementations are Sun Mojarra (2.2.x) and Apache MyFaces (2.2.x)
      Parameters:
      externalContext - the external context
      Returns:
      the faces implementation
    • initFacesConfiguration

      protected void initFacesConfiguration(javax.faces.context.FacesContext startupContext)
      Allows to programmatically extend the faces configuration
      Parameters:
      startupContext - the Startup Context
    • createWebApplication

      protected WebApplication createWebApplication(javax.faces.context.FacesContext startupContext)
      Creates a WebApplication instance
      Parameters:
      startupContext - the Startup Context
      Returns:
      the WebApplication instance
    • initWebApplication

      protected void initWebApplication(WebApplication facesApp, javax.faces.context.FacesContext startupContext)
      Initializes a WebApplication instance
      Parameters:
      facesApp - the WebApplication instance
      startupContext - the Startup Context