KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > theme > strategy > LayoutStrategy


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 package org.jboss.portal.server.theme.strategy;
9
10 /**
11  * The strategy of a layout can prepare the portal to render the correct portlets in the correct state.
12  * <p>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.
13  * It can only influence portlets that are in the current list of portlets to be rendered. The operations available to the strategy are:
14  * <UL>
15  * <LI>flag individual portlets in the list as 'do-not-render'</LI>
16  * <LI>change the window state of individual portlets in the list</LI>
17  * <LI>change the layout to be used to generate the portal markup</LI>
18  * </UL>
19  * </p>
20  *
21  * @author <a HREF="mailto:mholzner@novell.com">Martin Holzner</a>.
22  * @version <tt>$Revision: 1.3 $</tt>
23  */

24 public interface LayoutStrategy
25 {
26    /**
27     * Evaluate the strategy and return a strategy response, containing the desired changes.
28     *
29     * @param context a context containing the portal's current information about portlets, states and layout
30     * @return a strategy response with the desired changes
31     * @throws org.jboss.portal.server.theme.strategy.StrategyException
32     * if the strategy is missconfigured, or can't deal with the provided information
33     * @see StrategyResponse
34     * @see StrategyContext
35     */

36    StrategyResponse evaluate(StrategyContext context) throws StrategyException;
37 }
38
Popular Tags