org.apache.myfaces.context.servlet
Class FacesContextImplBase
java.lang.Object
javax.faces.context.FacesContext
org.apache.myfaces.context.servlet.FacesContextImplBase
- Direct Known Subclasses:
- FacesContextImpl, StartupFacesContextImpl
public abstract class FacesContextImplBase
- extends javax.faces.context.FacesContext
Provides a base implementation of the FacesContext for the use
in FacesContextImpl and StartupFacesContextImpl.
- Version:
- $Revision: 963629 $ $Date: 2010-07-13 04:29:07 -0500 (Tue, 13 Jul 2010) $
- Author:
- Jakob Korherr (latest modification by $Author: jakobk $)
Method Summary |
protected void |
assertNotReleased()
has to be thrown in many of the methods if the method is called after the instance has been released! |
javax.faces.application.Application |
getApplication()
|
java.util.Map<java.lang.Object,java.lang.Object> |
getAttributes()
Returns a mutable map of attributes associated with this faces context when
javax.faces.context.FacesContext.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 the
javax.faces.context.FacesContext.getExternalContext.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! |
javax.el.ELContext |
getELContext()
|
javax.faces.context.ExceptionHandler |
getExceptionHandler()
|
javax.faces.context.ExternalContext |
getExternalContext()
|
javax.faces.render.RenderKit |
getRenderKit()
|
javax.faces.component.UIViewRoot |
getViewRoot()
|
boolean |
isProcessingEvents()
|
void |
release()
Releases the instance fields on FacesContextImplBase. |
void |
setExceptionHandler(javax.faces.context.ExceptionHandler exceptionHandler)
|
void |
setProcessingEvents(boolean processingEvents)
|
void |
setViewRoot(javax.faces.component.UIViewRoot viewRoot)
|
Methods inherited from class javax.faces.context.FacesContext |
addMessage, getClientIdsWithMessages, getCurrentInstance, getCurrentPhaseId, getMaximumSeverity, getMessageList, getMessageList, getMessages, getMessages, getPartialViewContext, getRenderResponse, getResponseComplete, getResponseStream, getResponseWriter, isPostback, isProjectStage, isValidationFailed, renderResponse, responseComplete, setCurrentInstance, setCurrentPhaseId, setResponseStream, setResponseWriter, validationFailed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_released
protected boolean _released
FacesContextImplBase
public FacesContextImplBase(javax.faces.context.ExternalContext externalContext,
ReleaseableExternalContext defaultExternalContext)
- Base constructor.
Calls FacesContext.setCurrentInstance(this);
release
public void release()
- Releases the instance fields on FacesContextImplBase.
Must be called by sub-classes, when overriding it!
- Specified by:
release
in class javax.faces.context.FacesContext
getExternalContext
public final javax.faces.context.ExternalContext getExternalContext()
- Specified by:
getExternalContext
in class javax.faces.context.FacesContext
getApplication
public final javax.faces.application.Application getApplication()
- Specified by:
getApplication
in class javax.faces.context.FacesContext
getExceptionHandler
public final javax.faces.context.ExceptionHandler getExceptionHandler()
- Overrides:
getExceptionHandler
in class javax.faces.context.FacesContext
setExceptionHandler
public final void setExceptionHandler(javax.faces.context.ExceptionHandler exceptionHandler)
- Overrides:
setExceptionHandler
in class javax.faces.context.FacesContext
isProcessingEvents
public final boolean isProcessingEvents()
- Overrides:
isProcessingEvents
in class javax.faces.context.FacesContext
setProcessingEvents
public final void setProcessingEvents(boolean processingEvents)
- Overrides:
setProcessingEvents
in class javax.faces.context.FacesContext
getELContext
public final javax.el.ELContext getELContext()
- Overrides:
getELContext
in class javax.faces.context.FacesContext
getAttributes
public final java.util.Map<java.lang.Object,java.lang.Object> getAttributes()
- Returns a mutable map of attributes associated with this faces context when
javax.faces.context.FacesContext.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 the
javax.faces.context.FacesContext.getExternalContext.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 class javax.faces.context.FacesContext
- Throws:
java.lang.IllegalStateException
- if the current context already is released!- Since:
- JSF 2.0
getViewRoot
public javax.faces.component.UIViewRoot getViewRoot()
- Specified by:
getViewRoot
in class javax.faces.context.FacesContext
setViewRoot
public final void setViewRoot(javax.faces.component.UIViewRoot viewRoot)
- Specified by:
setViewRoot
in class javax.faces.context.FacesContext
getRenderKit
public final javax.faces.render.RenderKit getRenderKit()
- Specified by:
getRenderKit
in class javax.faces.context.FacesContext
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!
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.