public abstract class AbstractFacesInitializer extends Object implements FacesInitializer
Modifier and Type | Field and Description |
---|---|
static String |
CDI_BEAN_MANAGER_INSTANCE |
protected static String |
EXPRESSION_FACTORY
This parameter specifies the ExpressionFactory implementation to use.
|
static String |
INIT_PARAM_AUTOMATIC_EXTENSIONLESS_MAPPING
This parameter enables automatic extensionless mapping for all JSF views.
|
static boolean |
INIT_PARAM_AUTOMATIC_EXTENSIONLESS_MAPPING_DEFAULT |
static String |
INIT_PARAM_LOG_WEB_CONTEXT_PARAMS
Indicate if log all web config params should be done before initialize the webapp.
|
static String |
INIT_PARAM_LOG_WEB_CONTEXT_PARAMS_DEFAULT |
protected static String |
INITIALIZE_ALWAYS_STANDALONE
If this param is set to true, the check for faces servlet mapping is not done
|
Constructor and Description |
---|
AbstractFacesInitializer() |
Modifier and Type | Method and Description |
---|---|
void |
_callPreDestroyOnInjectedJSFArtifacts(FacesContext facesContext) |
protected RuntimeConfig |
buildConfiguration(jakarta.servlet.ServletContext servletContext,
ExternalContext externalContext,
jakarta.el.ExpressionFactory expressionFactory)
Configures this JSF application.
|
protected void |
checkForDeprecatedContextParams(FacesContext facesContext) |
void |
destroyFaces(jakarta.servlet.ServletContext servletContext)
Cleans up all remaining resources (well, theoretically).
|
void |
destroyShutdownFacesContext(FacesContext facesContext) |
void |
destroyStartupFacesContext(FacesContext facesContext) |
protected static jakarta.el.ExpressionFactory |
getUserDefinedExpressionFactory(ExternalContext externalContext)
Try to load user-definied ExpressionFactory.
|
protected void |
initAutomaticExtensionlessMapping(FacesContext facesContext,
jakarta.servlet.ServletContext servletContext) |
protected void |
initCDIIntegration(jakarta.servlet.ServletContext servletContext,
ExternalContext externalContext)
The intention of this method is provide a point where CDI integration is done.
|
protected abstract void |
initContainerIntegration(jakarta.servlet.ServletContext servletContext,
ExternalContext externalContext)
Performs initialization tasks depending on the current environment.
|
void |
initFaces(jakarta.servlet.ServletContext servletContext)
Performs all necessary initialization tasks like configuring this JSF
application.
|
FacesContext |
initShutdownFacesContext(jakarta.servlet.ServletContext servletContext) |
FacesContext |
initStartupFacesContext(jakarta.servlet.ServletContext servletContext) |
protected void |
initWebsocketIntegration(jakarta.servlet.ServletContext servletContext,
ExternalContext externalContext) |
protected static jakarta.el.ExpressionFactory |
loadExpressionFactory(String expressionFactoryClassName)
Loads and instantiates the given ExpressionFactory implementation.
|
protected static jakarta.el.ExpressionFactory |
loadExpressionFactory(String expressionFactoryClassName,
boolean logMissing) |
protected void |
validateFacesConfig(jakarta.servlet.ServletContext servletContext,
ExternalContext externalContext) |
@JSFWebConfigParam(since="1.2.7", group="EL") protected static final String EXPRESSION_FACTORY
@JSFWebConfigParam(since="2.0.3", defaultValue="false") protected static final String INITIALIZE_ALWAYS_STANDALONE
@JSFWebConfigParam(expectedValues="true, auto, false", defaultValue="auto") public static final String INIT_PARAM_LOG_WEB_CONTEXT_PARAMS
If is set in "auto" mode, web config params are only logged on "Development" and "Production" project stages.
public static final String INIT_PARAM_LOG_WEB_CONTEXT_PARAMS_DEFAULT
@JSFWebConfigParam(since="2.3", expectedValues="true, false", defaultValue="false") public static final String INIT_PARAM_AUTOMATIC_EXTENSIONLESS_MAPPING
public static final boolean INIT_PARAM_AUTOMATIC_EXTENSIONLESS_MAPPING_DEFAULT
public static final String CDI_BEAN_MANAGER_INSTANCE
public void initFaces(jakarta.servlet.ServletContext servletContext)
initFaces
in interface FacesInitializer
public void destroyFaces(jakarta.servlet.ServletContext servletContext)
destroyFaces
in interface FacesInitializer
protected RuntimeConfig buildConfiguration(jakarta.servlet.ServletContext servletContext, ExternalContext externalContext, jakarta.el.ExpressionFactory expressionFactory)
servletContext
- the current ServletContextexternalContext
- the current ExternalContextexpressionFactory
- the ExpressionFactory to useprotected void validateFacesConfig(jakarta.servlet.ServletContext servletContext, ExternalContext externalContext)
protected static jakarta.el.ExpressionFactory getUserDefinedExpressionFactory(ExternalContext externalContext)
null
,
if no custom ExpressionFactory was specified.externalContext
- the current ExternalContextnull
, if no no custom implementation was specifiedprotected static jakarta.el.ExpressionFactory loadExpressionFactory(String expressionFactoryClassName)
expressionFactoryClassName
- the class name of the ExpressionFactory implementationnull
, if an error occurredprotected static jakarta.el.ExpressionFactory loadExpressionFactory(String expressionFactoryClassName, boolean logMissing)
public FacesContext initStartupFacesContext(jakarta.servlet.ServletContext servletContext)
initStartupFacesContext
in interface FacesInitializer
public void destroyStartupFacesContext(FacesContext facesContext)
destroyStartupFacesContext
in interface FacesInitializer
public FacesContext initShutdownFacesContext(jakarta.servlet.ServletContext servletContext)
initShutdownFacesContext
in interface FacesInitializer
public void destroyShutdownFacesContext(FacesContext facesContext)
destroyShutdownFacesContext
in interface FacesInitializer
protected abstract void initContainerIntegration(jakarta.servlet.ServletContext servletContext, ExternalContext externalContext)
servletContext
- the current ServletContextexternalContext
- the current ExternalContextprotected void initCDIIntegration(jakarta.servlet.ServletContext servletContext, ExternalContext externalContext)
servletContext
- externalContext
- public void _callPreDestroyOnInjectedJSFArtifacts(FacesContext facesContext)
protected void initWebsocketIntegration(jakarta.servlet.ServletContext servletContext, ExternalContext externalContext)
protected void initAutomaticExtensionlessMapping(FacesContext facesContext, jakarta.servlet.ServletContext servletContext)
facesContext
- protected void checkForDeprecatedContextParams(FacesContext facesContext)
Copyright © 2020 The Apache Software Foundation. All rights reserved.