KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > jetspeed > portal > PanedPortletController


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 import org.apache.turbine.util.RunData;
20 import org.apache.turbine.util.DynamicURI;
21
22 /**
23  * This interface must be implemented by all portlet controllers that don't
24  * display their entire content at one time. The methods defined in this
25  * interface allows the controls object that interact with this controller
26  * to build the correct links for referencing the hidden portlets
27  *
28  * @author <a HREF="mailto:raphael@apache.org">Raphaël Luta</a>
29  * @author <a HREF="mailto:taylor@apache.org">David Sean Taylor</a>
30  *
31  * @version $Id: PanedPortletController.java,v 1.9 2004/02/23 04:05:35 jford Exp $
32  */

33 public interface PanedPortletController extends PortletController, PortletSetController
34 {
35     /*
36      * @return the pane parameter name
37      *
38      */

39     public String JavaDoc getPaneParameter();
40
41     /**
42      * Test whether the selected portlet is considered selected for the current
43      * request.
44      *
45      * @param p the Portlet to check
46      * @param rundata the RunData for the request
47      * @return true if the portlet is selected, false otherwise
48      */

49     public boolean isSelected( Portlet p, RunData rundata );
50
51     /**
52      * Builds a link object to access a given pane.
53      *
54      * @param p the pane portlet object
55      * @param rundata the rundata for this request
56      * @return a DynamicURI that can be used to reference the specific
57      * portlet
58      */

59     public DynamicURI getPortletURI( Portlet p, RunData rundata );
60
61     /**
62      * Returns the pane id of the parameter used for pane selection
63      *
64      * @param rundata The request data.
65      * @param byParameter Set to true to look by query parameter first.
66      * @return String The pane id for the selected pane.
67      */

68     public String JavaDoc retrievePaneID(RunData rundata, boolean byParameter);
69
70     /**
71      * Saves the pane id to the session to remember selection state of menu or tab.
72      *
73      * @param rundata The request data.
74      * @param id The tab id to save for this controller
75      */

76     public void savePaneID( RunData rundata, String JavaDoc id );
77
78     /**
79      * Sets the name of the pane that should
80      * be displayed
81      *
82      * @deprecated
83      *
84      * @param name the selection parameter name
85      */

86     public void savePaneName( RunData data, String JavaDoc name );
87
88     /**
89      * Returns the name of the pane selector parameter for this controller
90      *
91      * @deprecated
92      */

93     public String JavaDoc getParameterName();
94
95     /**
96      * Sets the name of the pane selector parameter for this controller
97      * @param name the new parameter name
98      *
99      * @deprecated
100      */

101     public void setParameterName(String JavaDoc name);
102
103     /**
104      * Returns the name of the pane that should be displayed
105      *
106      * @deprecated
107      *
108      * @param byParameter Set to true to look by query parameter first.
109      */

110     public String JavaDoc retrievePaneName(RunData rundata);
111
112 }
113
Popular Tags