Class FacesContextImplBase
- java.lang.Object
- 
- jakarta.faces.context.FacesContext
- 
- org.apache.myfaces.context.servlet.FacesContextImplBase
 
 
- 
- All Implemented Interfaces:
- Purgeable
 - Direct Known Subclasses:
- FacesContextImpl,- StartupFacesContextImpl
 
 public abstract class FacesContextImplBase extends FacesContext implements Purgeable 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 Modifier and Type Field Description protected boolean_released
 - 
Constructor SummaryConstructors Constructor Description FacesContextImplBase(ExternalContext externalContext, ExternalContext defaultExternalContext)Base constructor.FacesContextImplBase(ExternalContext externalContext, ExternalContext defaultExternalContext, ApplicationFactory applicationFactory, RenderKitFactory renderKitFactory)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertNotReleased()has to be thrown in many of the methods if the method is called after the instance has been released!ApplicationgetApplication()Map<Object,Object>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!protected FacesContextgetCurrentFacesContext()jakarta.el.ELContextgetELContext()ExceptionHandlergetExceptionHandler()ExternalContextgetExternalContext()chargetNamingContainerSeparatorChar()RenderKitgetRenderKit()List<String>getResourceLibraryContracts()UIViewRootgetViewRoot()booleanisProcessingEvents()booleanisReleased()voidpurge()voidrelease()Releases the instance fields on FacesContextImplBase.voidsetExceptionHandler(ExceptionHandler exceptionHandler)voidsetProcessingEvents(boolean processingEvents)voidsetResourceLibraryContracts(List<String> contracts)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
 
- 
 
- 
- 
- 
Constructor Detail- 
FacesContextImplBasepublic FacesContextImplBase(ExternalContext externalContext, ExternalContext defaultExternalContext) Base constructor. Calls FacesContext.setCurrentInstance(this);
 - 
FacesContextImplBasepublic FacesContextImplBase(ExternalContext externalContext, ExternalContext defaultExternalContext, ApplicationFactory applicationFactory, RenderKitFactory renderKitFactory) 
 
- 
 - 
Method Detail- 
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
 
 - 
getExternalContextpublic final ExternalContext getExternalContext() - Specified by:
- getExternalContextin class- FacesContext
 
 - 
getApplicationpublic final Application getApplication() - Specified by:
- getApplicationin class- FacesContext
 
 - 
getExceptionHandlerpublic final ExceptionHandler getExceptionHandler() - Overrides:
- getExceptionHandlerin class- FacesContext
 
 - 
setExceptionHandlerpublic final void setExceptionHandler(ExceptionHandler exceptionHandler) - 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
 
 - 
getAttributespublic final Map<Object,Object> 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 class- FacesContext
- Throws:
- IllegalStateException- if the current context already is released!
- Since:
- Faces 2.0
 
 - 
getViewRootpublic UIViewRoot getViewRoot() - Specified by:
- getViewRootin class- FacesContext
 
 - 
setViewRootpublic final void setViewRoot(UIViewRoot viewRoot) - Specified by:
- setViewRootin class- FacesContext
 
 - 
getRenderKitpublic final RenderKit getRenderKit() - Specified by:
- getRenderKitin class- FacesContext
 
 - 
getResourceLibraryContractspublic List<String> getResourceLibraryContracts() - Overrides:
- getResourceLibraryContractsin class- FacesContext
 
 - 
setResourceLibraryContractspublic void setResourceLibraryContracts(List<String> contracts) - 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!
 - 
getCurrentFacesContextprotected FacesContext getCurrentFacesContext() 
 
- 
 
-