Package org.apache.empire.jsf2.app
Class WebAppStartupListener
java.lang.Object
org.apache.empire.jsf2.app.WebAppStartupListener
- All Implemented Interfaces:
EventListener,javax.faces.event.FacesListener,javax.faces.event.SystemEventListener
-
Constructor Summary
ConstructorsConstructorDescriptionDefault Constructor with no initializationWebAppStartupListener(Class<? extends FacesConfiguration> facesConfigClass) Default Constructor with additional configuration -
Method Summary
Modifier and TypeMethodDescriptionprotected WebApplicationcreateWebApplication(javax.faces.context.FacesContext startupContext) Creates a WebApplication instanceprotected FacesImplementationdetectFacesImplementation(javax.faces.context.ExternalContext externalContext) Detects the JSF Implementation and returns an implmentation handler class.protected javax.servlet.ServletContextgetServletContext(javax.faces.context.FacesContext startupContext) protected voidinitFacesConfiguration(javax.faces.context.FacesContext startupContext) Allows to programmatically extend the faces configurationprotected voidinitWebApplication(WebApplication facesApp, javax.faces.context.FacesContext startupContext) Initializes a WebApplication instancebooleanisListenerForSource(Object source) voidprocessEvent(javax.faces.event.SystemEvent event)
-
Constructor Details
-
WebAppStartupListener
public WebAppStartupListener()Default Constructor with no initialization -
WebAppStartupListener
Default Constructor with additional configuration- Parameters:
facesConfigClass- the faces configuration
-
-
Method Details
-
getFacesImplementation
-
getServletContext
protected javax.servlet.ServletContext getServletContext(javax.faces.context.FacesContext startupContext) -
isListenerForSource
- Specified by:
isListenerForSourcein interfacejavax.faces.event.SystemEventListener
-
processEvent
public void processEvent(javax.faces.event.SystemEvent event) throws javax.faces.event.AbortProcessingException - Specified by:
processEventin interfacejavax.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
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 instancestartupContext- the Startup Context
-