public abstract class FacesContextWrapper extends FacesContext implements FacesWrapper<FacesContext>
Provides a simple implementation
of FacesContext
that can be subclassed by developers wishing to provide specialized behavior to an existing
FacesContext
instance. The default implementation of all methods is to call through to the wrapped
FacesContext
instance.
Usage: extend this class and push the implementation being wrapped to the constructor and use getWrapped()
to
access the instance being wrapped.
Constructor and Description |
---|
FacesContextWrapper()
Deprecated.
Use the other constructor taking the implementation being wrapped.
|
FacesContextWrapper(FacesContext wrapped)
If this faces context has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. |
Modifier and Type | Method and Description |
---|---|
void |
addMessage(java.lang.String clientId,
FacesMessage message)
The default behavior of this method is to call
FacesContext.addMessage(String, FacesMessage) on the wrapped
FacesContext object. |
Application |
getApplication()
The default behavior of this method is to call
FacesContext.getApplication() on the wrapped
FacesContext object. |
java.util.Map<java.lang.Object,java.lang.Object> |
getAttributes()
The default behavior of this method is to call
FacesContext.getAttributes() on the wrapped
FacesContext object. |
java.util.Iterator<java.lang.String> |
getClientIdsWithMessages()
The default behavior of this method is to call
FacesContext.getClientIdsWithMessages()
on the wrapped FacesContext object. |
PhaseId |
getCurrentPhaseId()
The default behavior of this method is to call
FacesContext.getCurrentPhaseId() on the wrapped
FacesContext object. |
ELContext |
getELContext()
The default behavior of this method is to call
FacesContext.getELContext() on the wrapped
FacesContext object. |
ExceptionHandler |
getExceptionHandler()
The default behavior of this method is to call
FacesContext.getExceptionHandler() on the wrapped
FacesContext object. |
ExternalContext |
getExternalContext()
The default behavior of this method is to call
FacesContext.getExternalContext() on the wrapped
FacesContext object. |
FacesMessage.Severity |
getMaximumSeverity()
The default behavior of this method is to call
FacesContext.getMaximumSeverity() on the wrapped
FacesContext object. |
java.util.List<FacesMessage> |
getMessageList()
The default behavior of this method is to call
FacesContext.getMessageList() on the wrapped
FacesContext object. |
java.util.List<FacesMessage> |
getMessageList(java.lang.String clientId)
The default behavior of this method is to call
FacesContext.getMessageList(String) on the wrapped
FacesContext object. |
java.util.Iterator<FacesMessage> |
getMessages()
The default behavior of this method is to call
FacesContext.getMessages() on the wrapped FacesContext
object. |
java.util.Iterator<FacesMessage> |
getMessages(java.lang.String clientId)
The default behavior of this method is to call
FacesContext.getMessages(String) on the wrapped
FacesContext object. |
char |
getNamingContainerSeparatorChar()
The default behavior of this method is to call |
PartialViewContext |
getPartialViewContext()
The default behavior of this method is to call
FacesContext.getPartialViewContext() ()} on the wrapped
FacesContext object. |
RenderKit |
getRenderKit()
The default behavior of this method is to call
FacesContext.getRenderKit() on the wrapped
FacesContext object. |
boolean |
getRenderResponse()
The default behavior of this method is to call
FacesContext.getRenderResponse() on the wrapped
FacesContext object. |
java.util.List<java.lang.String> |
getResourceLibraryContracts()
The default behavior of this method is to call
FacesContext.getResourceLibraryContracts() on the wrapped
FacesContext object. |
boolean |
getResponseComplete()
The default behavior of this method is to call
FacesContext.getResponseComplete() on the wrapped
FacesContext object. |
ResponseStream |
getResponseStream()
The default behavior of this method is to call
FacesContext.getResponseStream() on the wrapped
FacesContext object. |
ResponseWriter |
getResponseWriter()
The default behavior of this method is to call
FacesContext.getResponseWriter() on the wrapped
FacesContext object. |
UIViewRoot |
getViewRoot()
The default behavior of this method is to call
FacesContext.getViewRoot() on the wrapped FacesContext
object. |
FacesContext |
getWrapped()
A class that implements this interface uses this method to return an instance of the class being wrapped. |
boolean |
isPostback()
The default behavior of this method is to call
FacesContext.isPostback() on the wrapped FacesContext
object. |
boolean |
isProcessingEvents()
The default behavior of this method is to call
FacesContext.isProcessingEvents() on the
wrapped FacesContext object. |
boolean |
isProjectStage(ProjectStage stage)
The default behavior of this method is to call
FacesContext.isProjectStage(jakarta.faces.application.ProjectStage) on the wrapped
FacesContext object. |
boolean |
isReleased()
The default behavior of this method is to call |
boolean |
isValidationFailed()
The default behavior of this method is to call
FacesContext.isValidationFailed() on the
wrapped FacesContext object. |
void |
release()
The default behavior of this method is to call
FacesContext.release() on the wrapped FacesContext
object. |
void |
renderResponse()
The default behavior of this method is to call
FacesContext.renderResponse() on the wrapped
FacesContext object. |
void |
responseComplete()
The default behavior of this method is to call
FacesContext.responseComplete() on the wrapped
FacesContext object. |
void |
setCurrentPhaseId(PhaseId currentPhaseId)
The default behavior of this method is to call
FacesContext.setCurrentPhaseId(PhaseId) on the wrapped
FacesContext object. |
void |
setExceptionHandler(ExceptionHandler exceptionHandler)
The default behavior of this method is to call
FacesContext.setExceptionHandler(ExceptionHandler) on the
wrapped FacesContext object. |
void |
setProcessingEvents(boolean processingEvents)
The default behavior of this method is to call
FacesContext.setProcessingEvents(boolean) on the wrapped
FacesContext object. |
void |
setResourceLibraryContracts(java.util.List<java.lang.String> contracts)
The default behavior of this method is to call
FacesContext.setResourceLibraryContracts(java.util.List<java.lang.String>) on the wrapped
FacesContext object. |
void |
setResponseStream(ResponseStream responseStream)
The default behavior of this method is to call
FacesContext.setResponseStream(ResponseStream) on the wrapped
FacesContext object. |
void |
setResponseWriter(ResponseWriter responseWriter)
The default behavior of this method is to call
FacesContext.setResponseWriter(ResponseWriter) on the wrapped
FacesContext object. |
void |
setViewRoot(UIViewRoot root)
The default behavior of this method is to call
FacesContext.setViewRoot(UIViewRoot) on the wrapped
FacesContext object. |
void |
validationFailed()
The default behavior of this method is to call
FacesContext.validationFailed() on the
wrapped FacesContext object. |
getCurrentInstance, setCurrentInstance
@Deprecated public FacesContextWrapper()
public FacesContextWrapper(FacesContext wrapped)
If this faces context has been decorated, the implementation doing the decorating should push the implementation
being wrapped to this constructor. The getWrapped()
will then return the implementation being wrapped.
wrapped
- The implementation being wrapped.public FacesContext getWrapped()
FacesWrapper
A class that implements this interface uses this method to return an instance of the class being wrapped.
getWrapped
in interface FacesWrapper<FacesContext>
public Application getApplication()
The default behavior of this method is to call FacesContext.getApplication()
on the wrapped
FacesContext
object.
getApplication
in class FacesContext
Application
instance associated with this web application.FacesContext.getApplication()
public java.util.Iterator<java.lang.String> getClientIdsWithMessages()
The default behavior of this method is to call FacesContext.getClientIdsWithMessages()
on the wrapped FacesContext
object.
getClientIdsWithMessages
in class FacesContext
Iterator
over the client identifiers for which at least one
FacesMessage
has been queued.FacesContext.getClientIdsWithMessages()
public ExternalContext getExternalContext()
The default behavior of this method is to call FacesContext.getExternalContext()
on the wrapped
FacesContext
object.
getExternalContext
in class FacesContext
ExternalContext
FacesContext.getExternalContext()
public FacesMessage.Severity getMaximumSeverity()
The default behavior of this method is to call FacesContext.getMaximumSeverity()
on the wrapped
FacesContext
object.
getMaximumSeverity
in class FacesContext
FacesContext.getMaximumSeverity()
public java.util.Iterator<FacesMessage> getMessages()
The default behavior of this method is to call FacesContext.getMessages()
on the wrapped FacesContext
object.
getMessages
in class FacesContext
Iterator
over the FacesMessage
s that have been queued.FacesContext.getMessages()
public java.util.Iterator<FacesMessage> getMessages(java.lang.String clientId)
The default behavior of this method is to call FacesContext.getMessages(String)
on the wrapped
FacesContext
object.
getMessages
in class FacesContext
clientId
- The client identifier for which messages are requested, or null
for messages not
associated with any client identifierIterator
over the FacesMessage
s.FacesContext.getMessages(String)
public RenderKit getRenderKit()
The default behavior of this method is to call FacesContext.getRenderKit()
on the wrapped
FacesContext
object.
getRenderKit
in class FacesContext
RenderKit
associated with the UIViewRoot
.FacesContext.getRenderKit()
public boolean getRenderResponse()
The default behavior of this method is to call FacesContext.getRenderResponse()
on the wrapped
FacesContext
object.
getRenderResponse
in class FacesContext
renderResponse()
has been called.FacesContext.getRenderResponse()
public java.util.List<java.lang.String> getResourceLibraryContracts()
The default behavior of this method is to call FacesContext.getResourceLibraryContracts()
on the wrapped
FacesContext
object.
getResourceLibraryContracts
in class FacesContext
FacesContext.getResourceLibraryContracts()
public void setResourceLibraryContracts(java.util.List<java.lang.String> contracts)
The default behavior of this method is to call FacesContext.setResourceLibraryContracts(java.util.List<java.lang.String>)
on the wrapped
FacesContext
object.
setResourceLibraryContracts
in class FacesContext
contracts
- The new contracts to be returned, as an immutable List
. from a subsequent call to
FacesContext.getResourceLibraryContracts()
.FacesContext.setResourceLibraryContracts(java.util.List<java.lang.String>)
public boolean getResponseComplete()
The default behavior of this method is to call FacesContext.getResponseComplete()
on the wrapped
FacesContext
object.
getResponseComplete
in class FacesContext
responseComplete()
method has been called.FacesContext.getResponseComplete()
public ResponseStream getResponseStream()
The default behavior of this method is to call FacesContext.getResponseStream()
on the wrapped
FacesContext
object.
getResponseStream
in class FacesContext
ResponseStream
instance.FacesContext.getResponseStream()
public void setResponseStream(ResponseStream responseStream)
The default behavior of this method is to call FacesContext.setResponseStream(ResponseStream)
on the wrapped
FacesContext
object.
setResponseStream
in class FacesContext
responseStream
- The new ResponseStream for this responseFacesContext.setResponseStream(ResponseStream)
public ResponseWriter getResponseWriter()
The default behavior of this method is to call FacesContext.getResponseWriter()
on the wrapped
FacesContext
object.
getResponseWriter
in class FacesContext
ResponseWriter
instance.FacesContext.getResponseWriter()
public void setResponseWriter(ResponseWriter responseWriter)
The default behavior of this method is to call FacesContext.setResponseWriter(ResponseWriter)
on the wrapped
FacesContext
object.
setResponseWriter
in class FacesContext
responseWriter
- The new ResponseWriter for this responseFacesContext.setResponseWriter(ResponseWriter)
public UIViewRoot getViewRoot()
The default behavior of this method is to call FacesContext.getViewRoot()
on the wrapped FacesContext
object.
getViewRoot
in class FacesContext
UIViewRoot
instance.FacesContext.getViewRoot()
public void setViewRoot(UIViewRoot root)
The default behavior of this method is to call FacesContext.setViewRoot(UIViewRoot)
on the wrapped
FacesContext
object.
setViewRoot
in class FacesContext
root
- The new component UIViewRoot
componentFacesContext.setViewRoot(UIViewRoot)
public void addMessage(java.lang.String clientId, FacesMessage message)
The default behavior of this method is to call FacesContext.addMessage(String, FacesMessage)
on the wrapped
FacesContext
object.
addMessage
in class FacesContext
clientId
- The client identifier with which this message is associated (if any)message
- The message to be appendedFacesContext.addMessage(String, FacesMessage)
public boolean isReleased()
The default behavior of this method is to call FacesContext.isReleased()
on the wrapped FacesContext
object.
isReleased
in class FacesContext
true
if the resources have been released.FacesContext.isReleased()
public void release()
The default behavior of this method is to call FacesContext.release()
on the wrapped FacesContext
object.
release
in class FacesContext
FacesContext.release()
public void renderResponse()
The default behavior of this method is to call FacesContext.renderResponse()
on the wrapped
FacesContext
object.
renderResponse
in class FacesContext
FacesContext.renderResponse()
public void responseComplete()
The default behavior of this method is to call FacesContext.responseComplete()
on the wrapped
FacesContext
object.
responseComplete
in class FacesContext
FacesContext.responseComplete()
public java.util.Map<java.lang.Object,java.lang.Object> getAttributes()
The default behavior of this method is to call FacesContext.getAttributes()
on the wrapped
FacesContext
object.
getAttributes
in class FacesContext
Map
representing the attributes associated wth this FacesContext
instance.FacesContext.getAttributes()
public char getNamingContainerSeparatorChar()
The default behavior of this method is to call FacesContext.getNamingContainerSeparatorChar()
on the wrapped
FacesContext
object.
getNamingContainerSeparatorChar
in class FacesContext
FacesContext.getNamingContainerSeparatorChar()
public PartialViewContext getPartialViewContext()
The default behavior of this method is to call FacesContext.getPartialViewContext()
()} on the wrapped
FacesContext
object.
getPartialViewContext
in class FacesContext
PartialViewContext
for this request.FacesContext.getPartialViewContext()
public ELContext getELContext()
The default behavior of this method is to call FacesContext.getELContext()
on the wrapped
FacesContext
object.
getELContext
in class FacesContext
ELContext
.FacesContext.getELContext()
public ExceptionHandler getExceptionHandler()
The default behavior of this method is to call FacesContext.getExceptionHandler()
on the wrapped
FacesContext
object.
getExceptionHandler
in class FacesContext
ExceptionHandler
.FacesContext.getExceptionHandler()
public void setExceptionHandler(ExceptionHandler exceptionHandler)
The default behavior of this method is to call FacesContext.setExceptionHandler(ExceptionHandler)
on the
wrapped FacesContext
object.
setExceptionHandler
in class FacesContext
exceptionHandler
- the ExceptionHandler
for this request.FacesContext.setExceptionHandler(ExceptionHandler)
public java.util.List<FacesMessage> getMessageList()
The default behavior of this method is to call FacesContext.getMessageList()
on the wrapped
FacesContext
object.
getMessageList
in class FacesContext
List
which is effectively a snapshot of the messages present at the time of
invocation.FacesContext.getMessageList()
public java.util.List<FacesMessage> getMessageList(java.lang.String clientId)
The default behavior of this method is to call FacesContext.getMessageList(String)
on the wrapped
FacesContext
object.
getMessageList
in class FacesContext
clientId
- the client id of a component.List
which is effectively a snapshot of the messages present at the time of
invocation.FacesContext.getMessageList(String)
public boolean isPostback()
The default behavior of this method is to call FacesContext.isPostback()
on the wrapped FacesContext
object.
isPostback
in class FacesContext
FacesContext.isPostback()
public PhaseId getCurrentPhaseId()
The default behavior of this method is to call FacesContext.getCurrentPhaseId()
on the wrapped
FacesContext
object.
getCurrentPhaseId
in class FacesContext
FacesContext.getCurrentPhaseId()
public void setCurrentPhaseId(PhaseId currentPhaseId)
The default behavior of this method is to call FacesContext.setCurrentPhaseId(PhaseId)
on the wrapped
FacesContext
object.
setCurrentPhaseId
in class FacesContext
currentPhaseId
- The PhaseId
for the current phase.FacesContext.setCurrentPhaseId(PhaseId)
public boolean isValidationFailed()
The default behavior of this method is to call FacesContext.isValidationFailed()
on the
wrapped FacesContext
object.
isValidationFailed
in class FacesContext
validationFailed()
method has been called for the current requestFacesContext.isValidationFailed()
public void validationFailed()
The default behavior of this method is to call FacesContext.validationFailed()
on the
wrapped FacesContext
object.
validationFailed
in class FacesContext
FacesContext.validationFailed()
public void setProcessingEvents(boolean processingEvents)
The default behavior of this method is to call FacesContext.setProcessingEvents(boolean)
on the wrapped
FacesContext
object.
setProcessingEvents
in class FacesContext
processingEvents
- flag indicating events should be processed or notFacesContext.setProcessingEvents(boolean)
public boolean isProcessingEvents()
The default behavior of this method is to call FacesContext.isProcessingEvents()
on the
wrapped FacesContext
object.
isProcessingEvents
in class FacesContext
true
if events should be published, otherwise false
FacesContext.isProcessingEvents()
public boolean isProjectStage(ProjectStage stage)
The default behavior of this method is to call
FacesContext.isProjectStage(jakarta.faces.application.ProjectStage)
on the wrapped
FacesContext
object.
isProjectStage
in class FacesContext
stage
- the ProjectStage
to checkFacesContext.isProjectStage(jakarta.faces.application.ProjectStage)