Spec-Zone .ru
спецификации, руководства, описания, API


javax.faces.context
Class FacesContextWrapper

java.lang.Object
  extended by javax.faces.context.FacesContext
      extended by javax.faces.context.FacesContextWrapper
All Implemented Interfaces:
FacesWrapper<FacesContext>

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 override getWrapped() to return the instance being wrapping.

Since:
2.0

Constructor Summary
FacesContextWrapper()
           
 
Method Summary
 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.
 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.
 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.
abstract  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(javax.faces.application.ProjectStage) on the wrapped FacesContext object.
 boolean isReleased()
          

The default behavior of this method is to call FacesContext#isReleased on the wrapped FacesContext object.

 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 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.
 
Methods inherited from class javax.faces.context.FacesContext
getCurrentInstance, setCurrentInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacesContextWrapper

public FacesContextWrapper()
Method Detail

getWrapped

public abstract FacesContext getWrapped()
Description copied from interface: FacesWrapper

A class that implements this interface uses this method to return an instance of the class being wrapped.

Specified by:
getWrapped in interface FacesWrapper<FacesContext>
Returns:
the wrapped FacesContext instance
See Also:
FacesWrapper.getWrapped()

getApplication

public Application getApplication()

The default behavior of this method is to call FacesContext#getApplication() on the wrapped FacesContext object.

Specified by:
getApplication in class FacesContext
See Also:
FacesContext.getApplication()

getClientIdsWithMessages

public java.util.Iterator<java.lang.String> getClientIdsWithMessages()

The default behavior of this method is to call FacesContext.getClientIdsWithMessages() on the wrapped FacesContext object.

Specified by:
getClientIdsWithMessages in class FacesContext
See Also:
FacesContext#getClientIdsWithMessages()

getExternalContext

public ExternalContext getExternalContext()

The default behavior of this method is to call FacesContext#getExternalContext() on the wrapped FacesContext object.

Specified by:
getExternalContext in class FacesContext
See Also:
FacesContext.getExternalContext()

getMaximumSeverity

public FacesMessage.Severity getMaximumSeverity()

The default behavior of this method is to call FacesContext#getMaximumSeverity() on the wrapped FacesContext object.

Specified by:
getMaximumSeverity in class FacesContext
See Also:
FacesContext.getMaximumSeverity()

getMessages

public java.util.Iterator<FacesMessage> getMessages()

The default behavior of this method is to call FacesContext#getMessages() on the wrapped FacesContext object.

Specified by:
getMessages in class FacesContext
See Also:
FacesContext.getMessages()

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.

Specified by:
getMessages in class FacesContext
Parameters:
clientId - The client identifier for which messages are requested, or null for messages not associated with any client identifier
See Also:
FacesContext.getMessages(String)

getRenderKit

public RenderKit getRenderKit()

The default behavior of this method is to call FacesContext#getRenderKit() on the wrapped FacesContext object.

Specified by:
getRenderKit in class FacesContext
See Also:
FacesContext.getRenderKit()

getRenderResponse

public boolean getRenderResponse()

The default behavior of this method is to call FacesContext#getRenderResponse() on the wrapped FacesContext object.

Specified by:
getRenderResponse in class FacesContext
See Also:
FacesContext.getRenderResponse()

getResponseComplete

public boolean getResponseComplete()

The default behavior of this method is to call FacesContext#getResponseComplete() on the wrapped FacesContext object.

Specified by:
getResponseComplete in class FacesContext
See Also:
FacesContext.getResponseComplete()

getResponseStream

public ResponseStream getResponseStream()

The default behavior of this method is to call FacesContext#getResponseStream() on the wrapped FacesContext object.

Specified by:
getResponseStream in class FacesContext
See Also:
FacesContext.getResponseStream()

setResponseStream

public void setResponseStream(ResponseStream responseStream)

The default behavior of this method is to call FacesContext#setResponseStream(ResponseStream) on the wrapped FacesContext object.

Specified by:
setResponseStream in class FacesContext
Parameters:
responseStream - The new ResponseStream for this response
See Also:
FacesContext.setResponseStream(ResponseStream)

getResponseWriter

public ResponseWriter getResponseWriter()

The default behavior of this method is to call FacesContext#getResponseWriter() on the wrapped FacesContext object.

Specified by:
getResponseWriter in class FacesContext
See Also:
FacesContext.getResponseWriter()

setResponseWriter

public void setResponseWriter(ResponseWriter responseWriter)

The default behavior of this method is to call FacesContext#setResponseWriter(ResponseWriter) on the wrapped FacesContext object.

Specified by:
setResponseWriter in class FacesContext
Parameters:
responseWriter - The new ResponseWriter for this response
See Also:
FacesContext.setResponseWriter(ResponseWriter)

getViewRoot

public UIViewRoot getViewRoot()

The default behavior of this method is to call FacesContext#getViewRoot() on the wrapped FacesContext object.

Specified by:
getViewRoot in class FacesContext
See Also:
FacesContext.getViewRoot()

setViewRoot

public void setViewRoot(UIViewRoot root)

The default behavior of this method is to call FacesContext#setViewRoot(UIViewRoot) on the wrapped FacesContext object.

Specified by:
setViewRoot in class FacesContext
Parameters:
root - The new component UIViewRoot component
See Also:
FacesContext.setViewRoot(UIViewRoot)

addMessage

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.

Specified by:
addMessage in class FacesContext
Parameters:
clientId - The client identifier with which this message is associated (if any)
message - The message to be appended
See Also:
FacesContext.addMessage(String, FacesMessage)

isReleased

public boolean isReleased()

The default behavior of this method is to call FacesContext#isReleased on the wrapped FacesContext object.

Overrides:
isReleased in class FacesContext
Returns:
true if the resources have been released.
Since:
2.1
See Also:
FacesContext.isReleased()

release

public void release()

The default behavior of this method is to call FacesContext#release() on the wrapped FacesContext object.

Specified by:
release in class FacesContext
See Also:
FacesContext.release()

renderResponse

public void renderResponse()

The default behavior of this method is to call FacesContext#renderResponse() on the wrapped FacesContext object.

Specified by:
renderResponse in class FacesContext
See Also:
FacesContext.renderResponse()

responseComplete

public void responseComplete()

The default behavior of this method is to call FacesContext#responseComplete() on the wrapped FacesContext object.

Specified by:
responseComplete in class FacesContext
See Also:
FacesContext.responseComplete()

getAttributes

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.

Overrides:
getAttributes in class FacesContext
See Also:
FacesContext.getAttributes()

getPartialViewContext

public PartialViewContext getPartialViewContext()

The default behavior of this method is to call FacesContext#getPartialViewContext() ()} on the wrapped FacesContext object.

Overrides:
getPartialViewContext in class FacesContext
See Also:
FacesContext.getPartialViewContext()

getELContext

public ELContext getELContext()

The default behavior of this method is to call FacesContext#getELContext() on the wrapped FacesContext object.

Overrides:
getELContext in class FacesContext
See Also:
FacesContext.getELContext()

getExceptionHandler

public ExceptionHandler getExceptionHandler()

The default behavior of this method is to call FacesContext#getExceptionHandler() on the wrapped FacesContext object.

Overrides:
getExceptionHandler in class FacesContext
See Also:
FacesContext.getExceptionHandler()

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)

The default behavior of this method is to call FacesContext#setExceptionHandler(ExceptionHandler) on the wrapped FacesContext object.

Overrides:
setExceptionHandler in class FacesContext
Parameters:
exceptionHandler - the ExceptionHandler for this request.
See Also:
FacesContext.setExceptionHandler(ExceptionHandler)

getMessageList

public java.util.List<FacesMessage> getMessageList()

The default behavior of this method is to call FacesContext#getMessageList() on the wrapped FacesContext object.

Overrides:
getMessageList in class FacesContext
Returns:
an immutable List which is effectively a snapshot of the messages present at the time of invocation.
See Also:
FacesContext.getMessageList()

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.

Overrides:
getMessageList in class FacesContext
Returns:
an immutable List which is effectively a snapshot of the messages present at the time of invocation.
See Also:
FacesContext.getMessageList(String)

isPostback

public boolean isPostback()

The default behavior of this method is to call FacesContext#isPostback() on the wrapped FacesContext object.

Overrides:
isPostback in class FacesContext
See Also:
FacesContext.isPostback()

getCurrentPhaseId

public PhaseId getCurrentPhaseId()

The default behavior of this method is to call FacesContext#getCurrentPhaseId() on the wrapped FacesContext object.

Overrides:
getCurrentPhaseId in class FacesContext
See Also:
FacesContext.getCurrentPhaseId()

setCurrentPhaseId

public void setCurrentPhaseId(PhaseId currentPhaseId)

The default behavior of this method is to call FacesContext#setCurrentPhaseId(PhaseId) on the wrapped FacesContext object.

Overrides:
setCurrentPhaseId in class FacesContext
Parameters:
currentPhaseId - The PhaseId for the current phase.
See Also:
FacesContext.setCurrentPhaseId(PhaseId)

isValidationFailed

public boolean isValidationFailed()

The default behavior of this method is to call FacesContext.isValidationFailed() on the wrapped FacesContext object.

Overrides:
isValidationFailed in class FacesContext
See Also:
FacesContext#isValidationFailed

validationFailed

public void validationFailed()

The default behavior of this method is to call FacesContext.validationFailed() on the wrapped FacesContext object.

Overrides:
validationFailed in class FacesContext
See Also:
FacesContext#validationFailed()

setProcessingEvents

public void setProcessingEvents(boolean processingEvents)

The default behavior of this method is to call FacesContext#setProcessingEvents(boolean) on the wrapped FacesContext object.

Overrides:
setProcessingEvents in class FacesContext
Parameters:
processingEvents - flag indicating events should be processed or not
See Also:
FacesContext.setProcessingEvents(boolean)

isProcessingEvents

public boolean isProcessingEvents()

The default behavior of this method is to call FacesContext.isProcessingEvents() on the wrapped FacesContext object.

Overrides:
isProcessingEvents in class FacesContext
Returns:
true if events should be published, otherwise false
See Also:
FacesContext#isProcessingEvents()

isProjectStage

public boolean isProjectStage(ProjectStage stage)

The default behavior of this method is to call FacesContext.isProjectStage(javax.faces.application.ProjectStage) on the wrapped FacesContext object.

Overrides:
isProjectStage in class FacesContext
Parameters:
stage - the ProjectStage to check
See Also:
FacesContext#isProjectStage(javax.faces.application.ProjectStage)


Submit a bug or feature

Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 10-February-2011 12:41

free hit counter