org.jboss.portal.server.theme.render
Interface RenderContext

All Known Implementing Classes:
RenderContextImpl

public interface RenderContext

A render context allows all pieces that create markup a way to access relevant information for the current request and render process.

A render context is created for each portal request and render tag. It contains all the information needed to generate the markup of one region tag for the portal response.


Method Summary
 MediaType getContentType()
          Get the media type for this render process
 DecorationRenderer getDecorationRenderer()
          Get the implemetation of the decoration renderer to use in this context
 javax.servlet.http.HttpServletRequest getHttpServletRequest()
          Get the servlet request that is currently being serviced
 java.lang.StringBuffer getMarkupFragment()
          Get the StringBuffer that holds the markup to write back as response.
 org.w3c.dom.Document getMarkupFragmentAsDom()
          Get the xml dom document that holds the markup to write bach as response (perhaps after its been xsl transformed) This is for apps that rather build the result in XML (instead of a StringBuffer).
 PortalRequest getPortalRequest()
          Get the portal request that is currently being serviced
 PortalResponse getPortalResponse()
          Get the portal response for the current request
 PortletRenderer getPortletRenderer()
          Get the implementation of the portlet renderer to use for this context
 RegionOrientation getRegionOrientation()
          Get the region orientation for this render process
 RegionRenderer getRegionRenderer()
          Get the implementation of the region renderer to use in this context
 WindowRenderer getWindowRenderer()
          Get the implementation of the window renderer to use in this context
 

Method Detail

getMarkupFragment

java.lang.StringBuffer getMarkupFragment()
Get the StringBuffer that holds the markup to write back as response.

This is ment to be a convenient way to accumulate the markup generated by the individual processes involved in the rendering of the response. Each renderer in the render set simply appends it's markup to this buffer.

Returns:
the StringBuffer that contains the generated markup

getMarkupFragmentAsDom

org.w3c.dom.Document getMarkupFragmentAsDom()
Get the xml dom document that holds the markup to write bach as response (perhaps after its been xsl transformed) This is for apps that rather build the result in XML (instead of a StringBuffer).

Returns:
the Document that represents the generated markup
See Also:
getMarkupFragment()

getContentType

MediaType getContentType()
Get the media type for this render process

Returns:
the media type for this render process

getRegionOrientation

RegionOrientation getRegionOrientation()
Get the region orientation for this render process

Returns:
the region orientation for this render process

getHttpServletRequest

javax.servlet.http.HttpServletRequest getHttpServletRequest()
Get the servlet request that is currently being serviced

Returns:

getPortalRequest

PortalRequest getPortalRequest()
Get the portal request that is currently being serviced

Returns:
the portal request that is currently being serviced

getPortalResponse

PortalResponse getPortalResponse()
Get the portal response for the current request

Returns:
the portal response for the current request

getRegionRenderer

RegionRenderer getRegionRenderer()
                                 throws RenderException
Get the implementation of the region renderer to use in this context

Returns:
a region renderer to use for this context
Throws:
RenderException

getWindowRenderer

WindowRenderer getWindowRenderer()
                                 throws RenderException
Get the implementation of the window renderer to use in this context

Returns:
a window renderer to use for this context
Throws:
RenderException

getDecorationRenderer

DecorationRenderer getDecorationRenderer()
                                         throws RenderException
Get the implemetation of the decoration renderer to use in this context

Returns:
a decoration renderer to use for this context
Throws:
RenderException

getPortletRenderer

PortletRenderer getPortletRenderer()
                                   throws RenderException
Get the implementation of the portlet renderer to use for this context

Returns:
a portlet renderer to use for thsi context
Throws:
RenderException