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

StrategyResponse - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.theme.strategy
Interface StrategyResponse

All Known Implementing Classes:
StrategyResponseImpl

public interface StrategyResponse

Response of a layout strategy to communicate with the strategy interceptor.

The layout strategy can create a strategy response, and send it back to the strategy interceptor. The interceptor can then modify the request's state according to the desired changes expressed in the strategy response.


Method Summary
 void addNoRender(PortletContext portlet)
          Add a portlet to the list of portlets that are excluded from the render process.
 void addPortletModeChange(PortletContext portlet, Mode mode)
          Add a portlet to the list of portlets that received a new portlet mode by the strategy.
 void addWindowStateChange(PortletContext portlet, WindowState state)
          Add a portlet to the list of portlets that received a new window state by the strategy.
 java.lang.String getLayoutState()
          Get the state for this strategy response
 java.lang.String getLayoutURI()
          Get the URI of the layout to use.
 java.util.List getNoRenderList()
          Get the list of portlets (portlet context) that should not be rendered by the portlet container.
 java.util.Map getPortletModeChangeMap()
          Get a map of portlets that should change their mode, with the new mode in the value
 java.util.Map getWindowStateChangeMap()
          Get a map of portlets that should change their window state, with the new state in the value
 void reset()
          Reset all the state of this response.
 void setLayoutState(java.lang.String state)
          Set the state for this strategy response.
 void setLayoutURI(java.lang.String layoutURI)
          Set the layout URI to use
 

Method Detail

setLayoutURI

public void setLayoutURI(java.lang.String layoutURI)
Set the layout URI to use

Parameters:
layoutURI - the layout URI to use
See Also:
getLayoutURI()

getLayoutURI

public java.lang.String getLayoutURI()
Get the URI of the layout to use. Note: this URI can only be one of the layout URIs defined in the layout of this request If the strategy does not return a URI, the strategy interceptor will test if the response contains a state, and if so, will try to get the URI for that state from the layout

Returns:
the URI of the layout to delegate to
See Also:
PortalLayout.getURI(), PortalLayout.getURI(String), getLayoutState(), setLayoutURI(java.lang.String)

setLayoutState

public void setLayoutState(java.lang.String state)
Set the state for this strategy response.

The state is used to find a layout URI that is more atuned to this particular state

Parameters:
state - the state to use when looking for a layout URI
See Also:
PortalLayout.getURI(String)

getLayoutState

public java.lang.String getLayoutState()
Get the state for this strategy response

Returns:
the state for this strategy response
See Also:
setLayoutState(java.lang.String)

addWindowStateChange

public void addWindowStateChange(PortletContext portlet,
                                 WindowState state)
Add a portlet to the list of portlets that received a new window state by the strategy.

Parameters:
portlet - the portlet that got the new window state
state - the new window state
See Also:
PortletContext, WindowState, getWindowStateChangeMap()

getWindowStateChangeMap

public java.util.Map getWindowStateChangeMap()
Get a map of portlets that should change their window state, with the new state in the value

Returns:
a map of portlets with changed window states (key: portlet context: value: window state)
See Also:
PortletContext, WindowState, addWindowStateChange(org.jboss.portal.theme.page.PortletContext, org.jboss.portal.WindowState)

getNoRenderList

public java.util.List getNoRenderList()
Get the list of portlets (portlet context) that should not be rendered by the portlet container.

Returns:
the list of portlets that should not be rendered
See Also:
PortletContext, addNoRender(org.jboss.portal.theme.page.PortletContext)

addNoRender

public void addNoRender(PortletContext portlet)
Add a portlet to the list of portlets that are excluded from the render process.

Parameters:
portlet - the portlet to exclude

addPortletModeChange

public void addPortletModeChange(PortletContext portlet,
                                 Mode mode)
Add a portlet to the list of portlets that received a new portlet mode by the strategy.

Parameters:
portlet - the portlet that got the new portlet mode
mode - the new portlet mode
See Also:
PortletContext, Mode, getPortletModeChangeMap()

getPortletModeChangeMap

public java.util.Map getPortletModeChangeMap()
Get a map of portlets that should change their mode, with the new mode in the value

Returns:
a map of portlets with changed portlet modes (key: portlet context: value: portlet mode)
See Also:
PortletContext, Mode, addPortletModeChange(org.jboss.portal.theme.page.PortletContext, org.jboss.portal.Mode)

reset

public void reset()
Reset all the state of this response.

After the reset, the response's state is equal to the state after it was created