org.jboss.portal.theme.page
Class PageResult

java.lang.Object
  extended by org.jboss.portal.theme.page.PageResult
All Implemented Interfaces:
ObjectRendererContext, PageRendererContext

public class PageResult
extends java.lang.Object
implements PageRendererContext

Interface to represent the read only information of a rendered portal page.

The page result allows access to all the information needed to generate the final markup.

Version:
$Revision: 7322 $
Author:
Martin Holzner

Field Summary
protected  java.lang.String layoutState
          .
protected  java.lang.String pageName
          .
protected  java.util.Map properties
          .
protected  java.util.Map results
          .
protected  java.util.Map windowContexts
          .
 
Constructor Summary
PageResult(java.lang.String pageName)
           
PageResult(java.lang.String pageName, java.util.Map properties)
           
 
Method Summary
 void addWindowContext(WindowContext windowContext)
           
 java.lang.String getLayoutState()
          Get the state string of the layout.
 java.lang.String getPageName()
          Get the name of the requested page.
 java.util.Map getProperties()
           
 java.lang.String getProperty(java.lang.String name)
           
 RegionRendererContext getRegion(java.lang.String regionName)
           
 Region getRegion2(java.lang.String regionName)
          Get a reference to the region object for the provided region name.
 java.util.Collection getRegions()
           
 WindowRendererContext getWindow(java.lang.String windowId)
           
 WindowContext getWindowContext(java.lang.String windowId)
          Get the WindowContext for the provided window id.
 java.util.Map getWindowContextMap()
          Get a map of all PortletContexts on the page keyed by window id
 java.util.Set getWindowIds()
          Get a Set of all window ids that are contained in this page.
 void rebuild()
           
 void setLayoutState(java.lang.String layoutState)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

results

protected final java.util.Map results
.


windowContexts

protected final java.util.Map windowContexts
.


pageName

protected java.lang.String pageName
.


properties

protected java.util.Map properties
.


layoutState

protected java.lang.String layoutState
.

Constructor Detail

PageResult

public PageResult(java.lang.String pageName,
                  java.util.Map properties)

PageResult

public PageResult(java.lang.String pageName)
Method Detail

getRegion2

public Region getRegion2(java.lang.String regionName)
Get a reference to the region object for the provided region name.

Parameters:
regionName - the name of the region to get
Returns:
the region for the provided region name

getPageName

public java.lang.String getPageName()
Get the name of the requested page.

Returns:
the name of the page that is being rendered

getLayoutState

public java.lang.String getLayoutState()
Get the state string of the layout.

The state is used to further sub select a layout uri. One layout can contain a separate layout uri per state. The state has to match to string version of one of the allowed window states.

Returns:
a string representing the current window state to potentially further select a more specific layout uri

setLayoutState

public void setLayoutState(java.lang.String layoutState)

getWindowIds

public java.util.Set getWindowIds()
Get a Set of all window ids that are contained in this page.

Returns:
a set of all window ids on this page

getWindow

public WindowRendererContext getWindow(java.lang.String windowId)
Specified by:
getWindow in interface PageRendererContext

getWindowContext

public WindowContext getWindowContext(java.lang.String windowId)
Get the WindowContext for the provided window id.

Parameters:
windowId - the window id identifying the portlet to get the context for
Returns:
the window context for the provided window id

getWindowContextMap

public java.util.Map getWindowContextMap()
Get a map of all PortletContexts on the page keyed by window id

Returns:
a map of all portlet on the page

addWindowContext

public void addWindowContext(WindowContext windowContext)

getProperty

public java.lang.String getProperty(java.lang.String name)
Specified by:
getProperty in interface ObjectRendererContext

getProperties

public java.util.Map getProperties()
Specified by:
getProperties in interface ObjectRendererContext

getRegions

public java.util.Collection getRegions()
Specified by:
getRegions in interface PageRendererContext

getRegion

public RegionRendererContext getRegion(java.lang.String regionName)
Specified by:
getRegion in interface PageRendererContext

rebuild

public void rebuild()