|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.portal.theme.render.RenderContext
A render context to render a context on a page.
A render context is scoped to a MarkupContainer (a region, or a window). A render context that is not scoped to
a MarkupContainer is ment to be a page level template to allow easier creation of the region and window render contexts
via the RenderContext.getContext()
methods.
Constructor Summary | |
RenderContext(PortalLayout layout,
HTTPStreamInfo streamInfo,
MarkupResult result,
ServerRequest request)
Create a new render context for the provided result. |
Method Summary | |
java.lang.String |
getCharset()
|
MediaType |
getContentType()
|
RenderContext |
getContext(Region region,
java.lang.String cssId,
RegionOrientation orientation)
copy constructor. |
RenderContext |
getContext(WindowContext windowContext)
copy constructor. |
DecorationRenderer |
getDecorationRenderer()
|
DecorationRenderer |
getDecorationRenderer(WindowResult result)
Get the decoration renderer for the window that the provided window result is associated with. |
LayoutInfo |
getLayoutInfo()
|
java.util.List |
getLayoutRegionNames()
|
java.util.Locale |
getLocale()
|
java.util.Locale[] |
getLocales()
|
java.lang.StringBuffer |
getMarkupFragment()
|
java.util.Map |
getPageProperties()
|
Mode |
getPortletMode(WindowContext portletWindow)
|
PortletRenderer |
getPortletRenderer()
Get the portlet renderer from the render set that was determined for this context. |
PortletRenderer |
getPortletRenderer(WindowResult result)
Get the portlet renderer for the render set defined in the window properties that were provided. |
java.lang.String |
getProperty(WindowResult result,
java.lang.String key)
Get the proerty value that matches the property with the provided key in the provided window properties |
java.lang.String |
getRegionID()
|
RegionOrientation |
getRegionOrientation()
|
RegionRenderer |
getRegionRenderer()
|
RegionRenderer |
getRegionRenderer(java.lang.String renderSetName)
Get the region renderer from the render set whose name was provided. |
WindowRenderer |
getWindowRenderer()
|
WindowRenderer |
getWindowRenderer(WindowResult result)
Get the window renderer for the provided window. |
WindowState |
getWindowState(WindowContext portletWindow)
|
void |
render()
Render this context and it's children (i.e. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RenderContext(PortalLayout layout, HTTPStreamInfo streamInfo, MarkupResult result, ServerRequest request)
The result contains information about the markup container (page, region , window context) to render.
layout
- the layout that is used for this render contextstreamInfo
- information about the content type and encoding to use when writing the responseresult
- the rendered result(s) from the portlet container (PageResult, RegionResult, WindowResult)request
- the current server requestMethod Detail |
public RenderContext getContext(Region region, java.lang.String cssId, RegionOrientation orientation)
Get a render context for a region, based on the state of this render context, but with the provided css id and orientation (which overwrite the values in the provided region)
region
- the region to get the render context forcssId
- the id attribute value to generate for this region (needs to be unique in the page for the css to be
able to select this region to style)orientation
- the orintation of multiple windows in this region (arranged horizontally or vertically)
public RenderContext getContext(WindowContext windowContext)
Get the render context for the provided window context, using the current context as a template for layout, stream info,....
windowContext
- the window (context) to get the render context for
public java.lang.StringBuffer getMarkupFragment()
public MediaType getContentType()
public java.lang.String getCharset()
public RegionOrientation getRegionOrientation()
public LayoutInfo getLayoutInfo()
public RegionRenderer getRegionRenderer()
public RegionRenderer getRegionRenderer(java.lang.String renderSetName)
If no render set name was provided, this method is identical to the no arg version
renderSetName
- the name of an alternative render set to get the region renderer from
public WindowRenderer getWindowRenderer()
public WindowRenderer getWindowRenderer(WindowResult result)
The window result can optionally contain a window property that points to a render set to use when getting the window renderer. If no window property was provided, then the default render set of this context will be used.
result
- the window result possibly containing the window property that specifies an alternative render set name
for the window renderer to use
public DecorationRenderer getDecorationRenderer()
public DecorationRenderer getDecorationRenderer(WindowResult result)
If the window result contains a window property that points to a render set, that render set will be used to determine the decoration renderer. Otherwise, the render set that was determined for this context will be used.
result
- the window result possibly containing the window property that specifies an alternative render set name
for the decoration renderer to use
public PortletRenderer getPortletRenderer()
public PortletRenderer getPortletRenderer(WindowResult result)
If the provided window result doesn't contain any window property that defines a render set name, the default render set that was determined for this context will be used to get the portlet renderer.
result
- the window result containing the window properties to introspect for a render set name to get the portlet renderer from
public java.lang.String getRegionID()
public java.util.Map getPageProperties()
public java.util.List getLayoutRegionNames()
public java.lang.String getProperty(WindowResult result, java.lang.String key)
result
- the window result containing the window properties to introspectkey
- the property key
public java.util.Locale getLocale()
public java.util.Locale[] getLocales()
public WindowState getWindowState(WindowContext portletWindow)
portletWindow
-
public Mode getPortletMode(WindowContext portletWindow)
portletWindow
-
public void render() throws RenderException
Currently this context only knows how to render fragments of a page (i.e. region,window), not the entire page.
RenderException
getMarkupFragment()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |