Class FacesContextImplBase
java.lang.Object
jakarta.faces.context.FacesContext
org.apache.myfaces.context.servlet.FacesContextImplBase
- All Implemented Interfaces:
Purgeable
- Direct Known Subclasses:
FacesContextImpl
,StartupFacesContextImpl
Provides a base implementation of the FacesContext for the use
in FacesContextImpl and StartupFacesContextImpl.
- Version:
- $Revision$ $Date$
- Author:
- Jakob Korherr (latest modification by $Author$)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFacesContextImplBase
(ExternalContext externalContext, ExternalContext defaultExternalContext) Base constructor.FacesContextImplBase
(ExternalContext externalContext, ExternalContext defaultExternalContext, ApplicationFactory applicationFactory, RenderKitFactory renderKitFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
has to be thrown in many of the methods if the method is called after the instance has been released!final Application
Returns a mutable map of attributes associated with this faces context whenFacesContext.release()
is called the map must be cleared! Note this map is not associated with the request map the request map still is accessible via theExternalContext.getRequestMap()
method! Also the scope is different to the request map, this map has the scope of the context, and is cleared once the release method on the context is called! Also the map does not cause any events according to the spec!protected FacesContext
final jakarta.el.ELContext
final ExceptionHandler
final ExternalContext
char
final RenderKit
final boolean
boolean
void
purge()
void
release()
Releases the instance fields on FacesContextImplBase.final void
setExceptionHandler
(ExceptionHandler exceptionHandler) final void
setProcessingEvents
(boolean processingEvents) void
setResourceLibraryContracts
(List<String> contracts) final void
setViewRoot
(UIViewRoot viewRoot) Methods inherited from class jakarta.faces.context.FacesContext
addMessage, getClientIdsWithMessages, getCurrentInstance, getCurrentPhaseId, getLifecycle, getMaximumSeverity, getMessageList, getMessageList, getMessages, getMessages, getPartialViewContext, getRenderResponse, getResponseComplete, getResponseStream, getResponseWriter, isPostback, isProjectStage, isValidationFailed, renderResponse, responseComplete, setCurrentInstance, setCurrentPhaseId, setResponseStream, setResponseWriter, validationFailed
-
Field Details
-
_released
protected boolean _released
-
-
Constructor Details
-
FacesContextImplBase
public FacesContextImplBase(ExternalContext externalContext, ExternalContext defaultExternalContext) Base constructor. Calls FacesContext.setCurrentInstance(this); -
FacesContextImplBase
public FacesContextImplBase(ExternalContext externalContext, ExternalContext defaultExternalContext, ApplicationFactory applicationFactory, RenderKitFactory renderKitFactory)
-
-
Method Details
-
release
public void release()Releases the instance fields on FacesContextImplBase. Must be called by sub-classes, when overriding it!- Specified by:
release
in classFacesContext
-
isReleased
public boolean isReleased()- Overrides:
isReleased
in classFacesContext
-
getExternalContext
- Specified by:
getExternalContext
in classFacesContext
-
getApplication
- Specified by:
getApplication
in classFacesContext
-
purge
public void purge() -
getExceptionHandler
- Overrides:
getExceptionHandler
in classFacesContext
-
setExceptionHandler
- Overrides:
setExceptionHandler
in classFacesContext
-
isProcessingEvents
public final boolean isProcessingEvents()- Overrides:
isProcessingEvents
in classFacesContext
-
setProcessingEvents
public final void setProcessingEvents(boolean processingEvents) - Overrides:
setProcessingEvents
in classFacesContext
-
getELContext
public final jakarta.el.ELContext getELContext()- Overrides:
getELContext
in classFacesContext
-
getAttributes
Returns a mutable map of attributes associated with this faces context whenFacesContext.release()
is called the map must be cleared! Note this map is not associated with the request map the request map still is accessible via theExternalContext.getRequestMap()
method! Also the scope is different to the request map, this map has the scope of the context, and is cleared once the release method on the context is called! Also the map does not cause any events according to the spec!- Overrides:
getAttributes
in classFacesContext
- Throws:
IllegalStateException
- if the current context already is released!- Since:
- Faces 2.0
-
getViewRoot
- Specified by:
getViewRoot
in classFacesContext
-
setViewRoot
- Specified by:
setViewRoot
in classFacesContext
-
getRenderKit
- Specified by:
getRenderKit
in classFacesContext
-
getResourceLibraryContracts
- Overrides:
getResourceLibraryContracts
in classFacesContext
-
setResourceLibraryContracts
- Overrides:
setResourceLibraryContracts
in classFacesContext
-
getNamingContainerSeparatorChar
public char getNamingContainerSeparatorChar()- Overrides:
getNamingContainerSeparatorChar
in classFacesContext
-
assertNotReleased
protected final void assertNotReleased()has to be thrown in many of the methods if the method is called after the instance has been released! -
getCurrentFacesContext
-