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

StrategyContext - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.theme.strategy
Interface StrategyContext

All Known Implementing Classes:
StrategyContextImpl

public interface StrategyContext

A strategy context is a state holder for the evaluation of the layout strategy.

An implementation of the strategy context is passed by the strategy interceptor to the lauout strategy, in order to provide the strategy with the state of the current portal request.


Method Summary
 StrategyResponse createResponse()
          Create a new strategy response.
 java.lang.String getCharSet()
          Get the encoding in which the response to the current request will be emmited.
 javax.servlet.http.HttpServletRequest getHttpServletRequest()
          Get a reference to the javax.servlet.http.HttpServletRequest
 PortalLayout getLayout()
          Get the layout that is currently active for the request.
 MediaType getMediaType()
          Get the determined content type for the current request.
 java.util.List getPortletContexts()
          Get a list of all the portlets assigned to the requested page.
 java.lang.String[] getRegions()
          Get the names of all the regions of the current page.
 PortletContext getTargetPortlet()
          Get the targeted portlet for the current request, if any.
 PortalTheme getTheme()
          Get the theme that is currently active for the request.
 boolean isPortalSupportedPortletMode(Mode mode)
          Check if the presented PortletMode is allowed for the current portal.
 boolean isPortalSupportedWindowState(WindowState state)
          Check if the presented WindowState is allowed for the current portal.
 

Method Detail

getPortletContexts

public java.util.List getPortletContexts()
Get a list of all the portlets assigned to the requested page.

Returns:
a java.util.Map of org.jboss.portal.theme.strategy.PortletContext

getTargetPortlet

public PortletContext getTargetPortlet()
Get the targeted portlet for the current request, if any.

If the current request is dedicated to a particular portlet (action or render request for this portlet), make this information available.

Returns:
the portlet that is currently targeted, or null if this is not a request dedicated to a particular portlet

getLayout

public PortalLayout getLayout()
Get the layout that is currently active for the request.

The layout is the jsp or servlet that will handle the generation of the page's markup.

Returns:
the current layout for the request

getTheme

public PortalTheme getTheme()
Get the theme that is currently active for the request.

The theme is a set of css and image files that make up the look and feel of the rendered markup

Returns:
the current theme for the request

getRegions

public java.lang.String[] getRegions()
Get the names of all the regions of the current page.

Returns:
all the regions available on the current page

createResponse

public StrategyResponse createResponse()
Create a new strategy response.

Returns:
a new strategy response

getHttpServletRequest

public javax.servlet.http.HttpServletRequest getHttpServletRequest()
Get a reference to the javax.servlet.http.HttpServletRequest

Returns:
the HttpServletRequest instance of this portal request

getMediaType

public MediaType getMediaType()
Get the determined content type for the current request.

Returns:
the content type that will be emmited to the client at the end of the current request

getCharSet

public java.lang.String getCharSet()
Get the encoding in which the response to the current request will be emmited.

Returns:
the encoding of the response content

isPortalSupportedWindowState

public boolean isPortalSupportedWindowState(WindowState state)
Check if the presented WindowState is allowed for the current portal.

Parameters:
state - the state to check for validity
Returns:
true if the requested portal supports the presented state

isPortalSupportedPortletMode

public boolean isPortalSupportedPortletMode(Mode mode)
Check if the presented PortletMode is allowed for the current portal.

Parameters:
mode - the mode to check for validity
Returns:
true if the requested portal supports the presented mode