public abstract class AbstractFacesInitializer extends Object implements FacesInitializer
| Modifier and Type | Field and Description |
|---|---|
static String |
CDI_BEAN_MANAGER_INSTANCE |
static String |
INJECTED_BEAN_STORAGE_KEY |
| Constructor and Description |
|---|
AbstractFacesInitializer() |
| Modifier and Type | Method and Description |
|---|---|
void |
_callPreDestroyOnInjectedJSFArtifacts(FacesContext facesContext) |
protected RuntimeConfig |
buildConfiguration(javax.servlet.ServletContext servletContext,
ExternalContext externalContext,
javax.el.ExpressionFactory expressionFactory)
Configures this JSF application.
|
protected void |
cleanupAfterStartup(FacesContext facesContext) |
void |
destroyFaces(javax.servlet.ServletContext servletContext)
Cleans up all remaining resources (well, theoretically).
|
void |
destroyShutdownFacesContext(FacesContext facesContext) |
void |
destroyStartupFacesContext(FacesContext facesContext) |
protected static javax.el.ExpressionFactory |
getUserDefinedExpressionFactory(ExternalContext externalContext)
Try to load user-definied ExpressionFactory.
|
protected void |
initAutomaticExtensionlessMapping(FacesContext facesContext,
javax.servlet.ServletContext servletContext) |
protected void |
initCDIIntegration(javax.servlet.ServletContext servletContext,
ExternalContext externalContext)
The intention of this method is provide a point where CDI integration is done.
|
protected abstract void |
initContainerIntegration(javax.servlet.ServletContext servletContext,
ExternalContext externalContext)
Performs initialization tasks depending on the current environment.
|
void |
initFaces(javax.servlet.ServletContext servletContext)
Performs all necessary initialization tasks like configuring this JSF
application.
|
FacesContext |
initShutdownFacesContext(javax.servlet.ServletContext servletContext) |
FacesContext |
initStartupFacesContext(javax.servlet.ServletContext servletContext) |
protected void |
initWebsocketIntegration(javax.servlet.ServletContext servletContext,
ExternalContext externalContext) |
protected static javax.el.ExpressionFactory |
loadExpressionFactory(String expressionFactoryClassName)
Loads and instantiates the given ExpressionFactory implementation.
|
protected static javax.el.ExpressionFactory |
loadExpressionFactory(String expressionFactoryClassName,
boolean logMissing) |
protected void |
validateFacesConfig(javax.servlet.ServletContext servletContext,
ExternalContext externalContext) |
public static final String CDI_BEAN_MANAGER_INSTANCE
public static final String INJECTED_BEAN_STORAGE_KEY
public void initFaces(javax.servlet.ServletContext servletContext)
initFaces in interface FacesInitializerservletContext - The current ServletContextprotected void cleanupAfterStartup(FacesContext facesContext)
public void destroyFaces(javax.servlet.ServletContext servletContext)
destroyFaces in interface FacesInitializerservletContext - The current ServletContextprotected RuntimeConfig buildConfiguration(javax.servlet.ServletContext servletContext, ExternalContext externalContext, javax.el.ExpressionFactory expressionFactory)
servletContext - the current ServletContextexternalContext - the current ExternalContextexpressionFactory - the ExpressionFactory to useprotected void validateFacesConfig(javax.servlet.ServletContext servletContext,
ExternalContext externalContext)
protected static javax.el.ExpressionFactory getUserDefinedExpressionFactory(ExternalContext externalContext)
null,
if no custom ExpressionFactory was specified.externalContext - the current ExternalContextnull, if no no custom implementation was specifiedprotected static javax.el.ExpressionFactory loadExpressionFactory(String expressionFactoryClassName)
expressionFactoryClassName - the class name of the ExpressionFactory implementationnull, if an error occurredprotected static javax.el.ExpressionFactory loadExpressionFactory(String expressionFactoryClassName, boolean logMissing)
public FacesContext initStartupFacesContext(javax.servlet.ServletContext servletContext)
initStartupFacesContext in interface FacesInitializerpublic void destroyStartupFacesContext(FacesContext facesContext)
destroyStartupFacesContext in interface FacesInitializerpublic FacesContext initShutdownFacesContext(javax.servlet.ServletContext servletContext)
initShutdownFacesContext in interface FacesInitializerpublic void destroyShutdownFacesContext(FacesContext facesContext)
destroyShutdownFacesContext in interface FacesInitializerprotected abstract void initContainerIntegration(javax.servlet.ServletContext servletContext,
ExternalContext externalContext)
servletContext - the current ServletContextexternalContext - the current ExternalContextprotected void initCDIIntegration(javax.servlet.ServletContext servletContext,
ExternalContext externalContext)
FlowScoped and ViewScoped requires CDI in order to work,
so this method should set a BeanManager instance on application map under
the key "oam.cdi.BEAN_MANAGER_INSTANCE".
The default implementation look on ServletContext first and then use JNDI.servletContext - externalContext - public void _callPreDestroyOnInjectedJSFArtifacts(FacesContext facesContext)
protected void initWebsocketIntegration(javax.servlet.ServletContext servletContext,
ExternalContext externalContext)
protected void initAutomaticExtensionlessMapping(FacesContext facesContext, javax.servlet.ServletContext servletContext)
facesContext - servletContext - Copyright © 2021 The Apache Software Foundation. All rights reserved.