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

LayoutStrategy - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.theme.strategy
Class LayoutStrategy

java.lang.Object
  extended byorg.jboss.portal.theme.strategy.LayoutStrategy
Direct Known Subclasses:
MaximizingStrategyImpl

public abstract class LayoutStrategy
extends java.lang.Object

Abstract implementation of the layout strategy.

This implementation serves as base class for all layout strategies.


Constructor Summary
LayoutStrategy()
           
 
Method Summary
 java.lang.String getAppId()
          Get the name of the application (the WAR) that contains this strategy.
 MediaType getMediaType()
          Get the media type (content/mime type) this strategy is assigned to.
 java.lang.String getName()
          Get the name of this strategy.
 ServerRegistrationID getRegistrationId()
           
 void init(RuntimeContext runtimeContext, LayoutStrategyMetaData strategyMD)
           
abstract  StrategyResponse initialize(StrategyContext context)
          Initialize the strategy and return a strategy response, containing the desired changes.
abstract  StrategyResponse stateChanged(StrategyEvent evt, StrategyContext context)
          The navigational state of one of the portlet windows on a page has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutStrategy

public LayoutStrategy()
Method Detail

initialize

public abstract StrategyResponse initialize(StrategyContext context)
                                     throws StrategyException
Initialize 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:
StrategyException

stateChanged

public abstract StrategyResponse stateChanged(StrategyEvent evt,
                                              StrategyContext context)
                                       throws StrategyException
The navigational state of one of the portlet windows on a page has changed.

Parameters:
evt - the event carying the detected changes
context - a context containing the portal's current information about portlets, states and layout
Returns:
a strategy response with the desired changes
Throws:
StrategyException

init

public void init(RuntimeContext runtimeContext,
                 LayoutStrategyMetaData strategyMD)

getMediaType

public MediaType getMediaType()
Get the media type (content/mime type) this strategy is assigned to.

Returns:
the media type this strategy handles

getName

public java.lang.String getName()
Get the name of this strategy.

Returns:
the name of this strategy

getAppId

public java.lang.String getAppId()
Get the name of the application (the WAR) that contains this strategy.

Returns:
the name of the application (the WAR) that contains this strategy

getRegistrationId

public ServerRegistrationID getRegistrationId()