站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

PageRequestContextImpl - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.theme.impl.page
Class PageRequestContextImpl

java.lang.Object
  extended byorg.jboss.portal.theme.impl.page.PageRequestContextImpl
All Implemented Interfaces:
PageRequestContext

public final class PageRequestContextImpl
extends java.lang.Object
implements PageRequestContext

The page request context holds the state of the current page request.

This context allows the page invocation stack to read the necessary information about the currently requested resources.


Constructor Summary
PageRequestContextImpl(ServerInvocation invocation, java.util.Map windowContexts, java.util.Set supportedWindowStates, java.util.Set supportedModes, java.util.Map portalProperties, java.util.Map contentTypes, java.lang.String[] regionNames, java.lang.String targetWindowID, java.util.Map pageProperties)
          create a page request context.
 
Method Summary
 javax.servlet.http.HttpServletRequest getHttpRequest()
          Get the HttpServletRequest that caused the current page request.
 java.util.Map getPageProperties()
          Get the map of page properties for the currently requested page.
 java.util.Map getPortalProperties()
          Get the map of portal properties for the currently requested portal.
 java.util.List getPortletContexts()
          Get a map of all portlets on the currently requested page with their state information.
 java.lang.String[] getRegionNames()
          Get an array of the names of all the regions on the currently requested page.
 ServerRequest getServerRequest()
          Get the server request that caused this page request.
 HTTPStreamInfo getStreamInfo()
          Get the StreamInfo for the current request.
 java.util.Set getSupportedPortletModes()
          Get the portlet modes that are supported by the requested portal.
 java.util.Set getSupportedWindowStates()
          Get the window states that are supported by the requested portal.
 PortletContext getTargetPortlet()
          Get the portlet context for the targeted portlet, if any.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageRequestContextImpl

public PageRequestContextImpl(ServerInvocation invocation,
                              java.util.Map windowContexts,
                              java.util.Set supportedWindowStates,
                              java.util.Set supportedModes,
                              java.util.Map portalProperties,
                              java.util.Map contentTypes,
                              java.lang.String[] regionNames,
                              java.lang.String targetWindowID,
                              java.util.Map pageProperties)
create a page request context.

Parameters:
invocation - the ServerInvocation that triggered this PageRequest
windowContexts - a java.util.Map of org.jboss.portal.theme.page.WindowContext instances, keyed by window ID
supportedWindowStates - the window state provider to allow access to the supported window states
supportedModes - the portlet mode provider to allow access to the supported portlet modes
portalProperties - a java.util.Properties instance with portal properties
contentTypes - a java.util.Map of org.jboss.portal.server.plugins.mode.ContentTypes of each portlet on the requested page
regionNames - an array of all the region names on the requested page
targetWindowID - the name of a targeted (via serverInvocation) portlet window (if any)
pageProperties - defined properties for the page, including the prefered layout id to use.
Throws:
java.lang.IllegalArgumentException - if any of the following conditions occur:
  • the serverInvocation is null
  • portalProps is null
  • windowContexts is null
  • supportedWindowStates is null
  • supportedModes is null
  • regionNames is null
  • the targetWindowID is not one of the portlet windows on the page (contained in windowCotexts map)
Method Detail

getSupportedWindowStates

public java.util.Set getSupportedWindowStates()
Description copied from interface: PageRequestContext
Get the window states that are supported by the requested portal.

Note: These are the states supported by the portal. Each indivudual portlet can support a subset of these states.

Specified by:
getSupportedWindowStates in interface PageRequestContext
Returns:
the supported window states

getSupportedPortletModes

public java.util.Set getSupportedPortletModes()
Description copied from interface: PageRequestContext
Get the portlet modes that are supported by the requested portal.

Note: These are the modes supported by the portal. Each indivudual portlet can support a subset of these modes.

Specified by:
getSupportedPortletModes in interface PageRequestContext
Returns:
the supported portlet modes

getStreamInfo

public HTTPStreamInfo getStreamInfo()
Description copied from interface: PageRequestContext
Get the StreamInfo for the current request.

The stream info allows access to content type and char encoding that will be used to write the response of this request.

Specified by:
getStreamInfo in interface PageRequestContext
Returns:
the stream info for the current request

getServerRequest

public ServerRequest getServerRequest()
Description copied from interface: PageRequestContext
Get the server request that caused this page request.

Specified by:
getServerRequest in interface PageRequestContext
Returns:
the current server request

getHttpRequest

public javax.servlet.http.HttpServletRequest getHttpRequest()
Description copied from interface: PageRequestContext
Get the HttpServletRequest that caused the current page request.

Specified by:
getHttpRequest in interface PageRequestContext
Returns:
the http servlet request

getPortalProperties

public java.util.Map getPortalProperties()
Description copied from interface: PageRequestContext
Get the map of portal properties for the currently requested portal.

Specified by:
getPortalProperties in interface PageRequestContext
Returns:
a map of portal properties

getPageProperties

public java.util.Map getPageProperties()
Description copied from interface: PageRequestContext
Get the map of page properties for the currently requested page.

Specified by:
getPageProperties in interface PageRequestContext
Returns:
a map of page properties

getPortletContexts

public java.util.List getPortletContexts()
Description copied from interface: PageRequestContext
Get a map of all portlets on the currently requested page with their state information.

Specified by:
getPortletContexts in interface PageRequestContext
Returns:
a map of portlets on the currently requested page
See Also:
StrategyContext.getPortletContexts(), PortletContext

getTargetPortlet

public PortletContext getTargetPortlet()
Description copied from interface: PageRequestContext
Get the portlet context for the targeted portlet, if any.

Specified by:
getTargetPortlet in interface PageRequestContext
Returns:
the portlet context for the targeted portlet, or null if no portlet was targeted with the current request

getRegionNames

public java.lang.String[] getRegionNames()
Description copied from interface: PageRequestContext
Get an array of the names of all the regions on the currently requested page.

Specified by:
getRegionNames in interface PageRequestContext
Returns:
the names of all the regions on the currently requested page