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 SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionFacesContextImplBase(ExternalContext externalContext, ExternalContext defaultExternalContext) Base constructor.FacesContextImplBase(ExternalContext externalContext, ExternalContext defaultExternalContext, ApplicationFactory applicationFactory, RenderKitFactory renderKitFactory) 
- 
Method SummaryModifier 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.FacesContextaddMessage, 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- 
_releasedprotected boolean _released
 
- 
- 
Constructor Details- 
FacesContextImplBasepublic FacesContextImplBase(ExternalContext externalContext, ExternalContext defaultExternalContext) Base constructor. Calls FacesContext.setCurrentInstance(this);
- 
FacesContextImplBasepublic FacesContextImplBase(ExternalContext externalContext, ExternalContext defaultExternalContext, ApplicationFactory applicationFactory, RenderKitFactory renderKitFactory) 
 
- 
- 
Method Details- 
releasepublic void release()Releases the instance fields on FacesContextImplBase. Must be called by sub-classes, when overriding it!- Specified by:
- releasein class- FacesContext
 
- 
isReleasedpublic boolean isReleased()- Overrides:
- isReleasedin class- FacesContext
 
- 
getExternalContext- Specified by:
- getExternalContextin class- FacesContext
 
- 
getApplication- Specified by:
- getApplicationin class- FacesContext
 
- 
purgepublic void purge()
- 
getExceptionHandler- Overrides:
- getExceptionHandlerin class- FacesContext
 
- 
setExceptionHandler- Overrides:
- setExceptionHandlerin class- FacesContext
 
- 
isProcessingEventspublic final boolean isProcessingEvents()- Overrides:
- isProcessingEventsin class- FacesContext
 
- 
setProcessingEventspublic final void setProcessingEvents(boolean processingEvents) - Overrides:
- setProcessingEventsin class- FacesContext
 
- 
getELContextpublic final jakarta.el.ELContext getELContext()- Overrides:
- getELContextin class- FacesContext
 
- 
getAttributesReturns 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 class- FacesContext
- Throws:
- IllegalStateException- if the current context already is released!
- Since:
- Faces 2.0
 
- 
getViewRoot- Specified by:
- getViewRootin class- FacesContext
 
- 
setViewRoot- Specified by:
- setViewRootin class- FacesContext
 
- 
getRenderKit- Specified by:
- getRenderKitin class- FacesContext
 
- 
getResourceLibraryContracts- Overrides:
- getResourceLibraryContractsin class- FacesContext
 
- 
setResourceLibraryContracts- Overrides:
- setResourceLibraryContractsin class- FacesContext
 
- 
getNamingContainerSeparatorCharpublic char getNamingContainerSeparatorChar()- Overrides:
- getNamingContainerSeparatorCharin class- FacesContext
 
- 
assertNotReleasedprotected final void assertNotReleased()has to be thrown in many of the methods if the method is called after the instance has been released!
- 
getCurrentFacesContext
 
-