org.springframework.extensions.surf.render
Class WrappedRenderContext

java.lang.Object
  extended by org.springframework.extensions.surf.WrappedRequestContext
      extended by org.springframework.extensions.surf.render.WrappedRenderContext
All Implemented Interfaces:
Serializable, RenderContext, RequestContext

public final class WrappedRenderContext
extends WrappedRequestContext
implements RenderContext, Serializable

A render context instance is available to all rendering engines and provides a convenient grab bag of things that are useful to component or template developer.

Author:
muzquiano
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.springframework.extensions.surf.RequestContext
ATTR_REQUEST_CONTEXT, DEBUG_MODE_VALUE_COMPONENTS, VALUE_CREDENTIAL_VAULT, VALUE_HEAD_TAGS, VALUE_IDENTITY_VAULT
 
Constructor Summary
WrappedRenderContext(RenderContext context)
           
 
Method Summary
 String getContentAsString()
           
 ModelObject getObject()
           
 RenderContextProvider getProvider()
           
 String getRenderId()
           
 RenderMode getRenderMode()
           
 javax.servlet.http.HttpServletRequest getRequest()
          Returns the HTTP Servlet Request bound to this request
 javax.servlet.http.HttpServletResponse getResponse()
           
 Serializable getValue(String key, RenderContextScope scope)
           
 boolean hasValue(String key, RenderContextScope scope)
           
 boolean isPassiveMode()
           
 void release()
          Release any resources held by the request context As part of the contract for a RequestContext object, this will only ever be called once and no further method calls will be made to the RequestContext object.
 void removeValue(String key, RenderContextScope scope)
           
 void setObject(ModelObject modelObject)
           
 void setPassiveMode(boolean passiveMode)
           
 void setRenderMode(RenderMode renderMode)
           
 void setRequest(javax.servlet.http.HttpServletRequest request)
           
 void setResponse(javax.servlet.http.HttpServletResponse response)
           
 void setValue(String key, Serializable value, RenderContextScope scope)
           
 
Methods inherited from class org.springframework.extensions.surf.WrappedRequestContext
getCredentialVault, getCurrentObject, getCurrentObjectId, getFormatId, getId, getLinkBuilder, getModel, getOriginalContext, getPage, getPageId, getPageTitle, getParameter, getParameters, getRenderingComponents, getRequestContent, getRequestContentType, getRequestMethod, getRootPage, getServiceRegistry, getSiteConfiguration, getTemplate, getTemplateId, getTheme, getThemeId, getUri, getUser, getUserId, getValue, getValuesMap, getViewModel, getWebsiteTitle, hasParameter, hasValue, removeValue, setCurrentObject, setFormatId, setModel, setPage, setRenderingComponent, setTemplate, setThemeId, setUri, setUser, setValue, setViewModel, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.extensions.surf.RequestContext
getCredentialVault, getCurrentObject, getCurrentObjectId, getFormatId, getId, getLinkBuilder, getModel, getPage, getPageId, getPageTitle, getParameter, getParameters, getRenderingComponents, getRequestContent, getRequestContentType, getRequestMethod, getRootPage, getServiceRegistry, getSiteConfiguration, getTemplate, getTemplateId, getTheme, getThemeId, getUri, getUser, getUserId, getValue, getValuesMap, getViewModel, getWebsiteTitle, hasParameter, hasValue, removeValue, setCurrentObject, setFormatId, setModel, setPage, setRenderingComponent, setTemplate, setThemeId, setUri, setUser, setValue, setViewModel
 

Constructor Detail

WrappedRenderContext

public WrappedRenderContext(RenderContext context)
Method Detail

getContentAsString

public String getContentAsString()
                          throws UnsupportedEncodingException
Throws:
UnsupportedEncodingException

getRenderMode

public RenderMode getRenderMode()
Specified by:
getRenderMode in interface RenderContext

setRenderMode

public void setRenderMode(RenderMode renderMode)
Specified by:
setRenderMode in interface RenderContext

getRequest

public javax.servlet.http.HttpServletRequest getRequest()
Description copied from interface: RequestContext
Returns the HTTP Servlet Request bound to this request

Specified by:
getRequest in interface RequestContext
Overrides:
getRequest in class WrappedRequestContext
Returns:

setRequest

public void setRequest(javax.servlet.http.HttpServletRequest request)
Specified by:
setRequest in interface RenderContext

getResponse

public javax.servlet.http.HttpServletResponse getResponse()
Specified by:
getResponse in interface RenderContext

setResponse

public void setResponse(javax.servlet.http.HttpServletResponse response)
Specified by:
setResponse in interface RenderContext

getObject

public ModelObject getObject()
Specified by:
getObject in interface RenderContext

setObject

public void setObject(ModelObject modelObject)
Specified by:
setObject in interface RenderContext

getRenderId

public String getRenderId()
Specified by:
getRenderId in interface RenderContext

setPassiveMode

public void setPassiveMode(boolean passiveMode)
Specified by:
setPassiveMode in interface RenderContext

isPassiveMode

public boolean isPassiveMode()
Specified by:
isPassiveMode in interface RenderContext

getProvider

public RenderContextProvider getProvider()
Specified by:
getProvider in interface RenderContext

release

public void release()
Description copied from interface: RequestContext
Release any resources held by the request context As part of the contract for a RequestContext object, this will only ever be called once and no further method calls will be made to the RequestContext object.

Specified by:
release in interface RenderContext
Specified by:
release in interface RequestContext
Overrides:
release in class WrappedRequestContext

setValue

public void setValue(String key,
                     Serializable value,
                     RenderContextScope scope)
Specified by:
setValue in interface RenderContext

getValue

public Serializable getValue(String key,
                             RenderContextScope scope)
Specified by:
getValue in interface RenderContext

removeValue

public void removeValue(String key,
                        RenderContextScope scope)
Specified by:
removeValue in interface RenderContext

hasValue

public boolean hasValue(String key,
                        RenderContextScope scope)
Specified by:
hasValue in interface RenderContext


Copyright © 2009 SpringSource, Inc. All Rights Reserved.