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 voidhas to be thrown in many of the methods if the method is called after the instance has been released!final ApplicationReturns 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 FacesContextfinal jakarta.el.ELContextfinal ExceptionHandlerfinal ExternalContextcharfinal RenderKitfinal booleanbooleanvoidpurge()voidrelease()Releases the instance fields on FacesContextImplBase.final voidsetExceptionHandler(ExceptionHandler exceptionHandler) final voidsetProcessingEvents(boolean processingEvents) voidsetResourceLibraryContracts(List<String> contracts) final voidsetViewRoot(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:
releasein classFacesContext
-
isReleased
public boolean isReleased()- Overrides:
isReleasedin classFacesContext
-
getExternalContext
- Specified by:
getExternalContextin classFacesContext
-
getApplication
- Specified by:
getApplicationin classFacesContext
-
purge
public void purge() -
getExceptionHandler
- Overrides:
getExceptionHandlerin classFacesContext
-
setExceptionHandler
- Overrides:
setExceptionHandlerin classFacesContext
-
isProcessingEvents
public final boolean isProcessingEvents()- Overrides:
isProcessingEventsin classFacesContext
-
setProcessingEvents
public final void setProcessingEvents(boolean processingEvents) - Overrides:
setProcessingEventsin classFacesContext
-
getELContext
public final jakarta.el.ELContext getELContext()- Overrides:
getELContextin 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:
getAttributesin classFacesContext- Throws:
IllegalStateException- if the current context already is released!- Since:
- Faces 2.0
-
getViewRoot
- Specified by:
getViewRootin classFacesContext
-
setViewRoot
- Specified by:
setViewRootin classFacesContext
-
getRenderKit
- Specified by:
getRenderKitin classFacesContext
-
getResourceLibraryContracts
- Overrides:
getResourceLibraryContractsin classFacesContext
-
setResourceLibraryContracts
- Overrides:
setResourceLibraryContractsin classFacesContext
-
getNamingContainerSeparatorChar
public char getNamingContainerSeparatorChar()- Overrides:
getNamingContainerSeparatorCharin 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
-