org.jboss.portal.server.theme.strategy
Interface LayoutStrategy

All Known Implementing Classes:
DefaultStrategyImpl

public interface LayoutStrategy

The strategy of a layout can prepare the portal to render the correct portlets in the correct state.

A layout strategy is a place where the layout can tell the portal to change attributes of the portlets that are about to be rendered. It can only influence portlets that are in the current list of portlets to be rendered. The operations available to the strategy are:


Method Summary
 StrategyResponse evaluate(StrategyContext context)
          Evaluate the strategy and return a strategy response, containing the desired changes.
 MediaType getMediaType()
           
 void setMediaType(MediaType mediaType)
          Set the media type (the content type) of this strategy.
 

Method Detail

setMediaType

void setMediaType(MediaType mediaType)
Set the media type (the content type) of this strategy.

Parameters:
mediaType - the media type to set

evaluate

StrategyResponse evaluate(StrategyContext context)
                          throws StrategyException
Evaluate the strategy and return a strategy response, containing the desired changes.

Parameters:
context - a context containing the portal's current information about portlets, states and layout
Returns:
a strategy response with the desired changes
Throws:
org.jboss.portal.core.theme.strategy.StrategyException - if the strategy is missconfigured, or can't deal with the provided information
StrategyException

getMediaType

MediaType getMediaType()