View Javadoc

1   /*
2    * Copyright 2000-2001,2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.apache.jetspeed.portal;
18  
19  // Turbine stuff
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 }