1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.portal;
18
19
20 import org.apache.turbine.util.RunData;
21
22 /***
23 * This interface allows implementing portlets to modify the
24 * behavior of their PortletControl manager by specifically allowing or
25 * refusing window manipulation actions.
26 * If the given PortletControl implements these actions, it must use
27 * this information.
28 *
29 * @author <a href="mailto:raphael@apache.org">Raphaël Luta</a>
30 * @author <a href="mailto:re_carrasco@bco011.sonda.cl">Roberto Carrasco</a>
31 * @author <a href="mailto:morciuch@apache.org">Mark Orciuch</a>
32 */
33 public interface PortletState
34 {
35
36 /***
37 * Returns true if the portlet allows the use to remove it from its portlat
38 * page
39 *
40 * @param rundata the RunData object for the current request
41 */
42 public boolean allowClose( RunData rundata );
43
44 /***
45 * Returns true if this portlet is currently closed
46 */
47 public boolean isClosed(RunData data);
48
49 /***
50 * Toggles the portlet state between closed and normal
51 *
52 * @param minimized the new portlet state
53 * @param data the RunData for this request
54 */
55 public void setClosed(boolean closed, RunData data);
56
57 /***
58 * Returns true if the portlet allows the manager to link to a information
59 * page about this portlet
60 *
61 * @param rundata the RunData object for the current request
62 */
63 public boolean allowInfo( RunData rundata );
64
65 /***
66 * Returns true if the portlet supports customization of its options
67 *
68 * @param rundata the RunData object for the current request
69 */
70 public boolean allowCustomize( RunData rundata );
71
72 /***
73 * Returns true if the portlet allows the user to maximize it, ie use
74 * all the display space allowed to portlets in the given pane
75 *
76 * @param rundata the RunData object for the current request
77 */
78 public boolean allowMaximize( RunData rundata );
79
80 /***
81 * Returns true if the portlet allows the user to minimize it.
82 * The portlet content is not displayed when minimized
83 *
84 * @param rundata the RunData object for the current request
85 */
86 public boolean allowMinimize( RunData rundata );
87
88 /***
89 * Returns true if this portlet is currently minimized
90 */
91 public boolean isMinimized(RunData data);
92
93 /***
94 * Toggles the portlet state between minimized and normal
95 *
96 * @param minimized the new portlet state
97 * @param data the RunData for this request
98 */
99 public void setMinimized(boolean minimized, RunData data);
100
101 /***
102 * Returns true if the portlet allows the user to display it in print friendly format.
103 *
104 * @param rundata the RunData object for the current request
105 */
106 public boolean allowPrintFriendly( RunData rundata );
107
108 }