org.jboss.portal.server.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.
 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.
 java.lang.String getPageName()
          Get the name of the page that was requested
 java.lang.String getPortalName()
          Get the name of the currently requested portal.
 java.util.Collection getPortletList()
          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.
 

Method Detail

getPortletList

java.util.Collection getPortletList()
Get a list of all the portlets assigned to the requested page.

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

getTargetPortlet

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

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

getPortalName

java.lang.String getPortalName()
Get the name of the currently requested portal.

The current portal is usually implicitely requested via the requested page, which belongs to one and only one portal.

Returns:
the name of the requested portal (for this request)

getPageName

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

Returns:
the name of the current page

getRegions

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

StrategyResponse createResponse()
Create a new strategy response.

Returns:
a new strategy response

getHttpServletRequest

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

Returns:
the HttpServletRequest instance of this portal request