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 at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * 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 and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.services.rundata;
1819import org.apache.jetspeed.portal.Portlet;
20import org.apache.jetspeed.om.profile.Profile;
21import org.apache.jetspeed.capability.CapabilityMap;
22import org.apache.jetspeed.services.statemanager.SessionState;
23import org.apache.turbine.services.rundata.TurbineRunData;
24import org.apache.jetspeed.om.security.JetspeedUser;
2526/***27 * This interface extends the RunData interface with methods28 * specific to the needs of a Jetspeed like portal implementation.29 *30 * <note>Several of these properties may be put in the base RunData31 * interface in future releases of Turbine</note>32 *33 * @author <a href="mailto:raphael@apache.org">Raphaël Luta</a>34 * @version $Id: JetspeedRunData.java,v 1.10 2004/02/23 03:36:10 jford Exp $35 */36publicinterfaceJetspeedRunDataextends TurbineRunData
37 {
3839publicint NORMAL = 0;
40publicint CUSTOMIZE = 1;
41publicint MAXIMIZE = 2;
4243/***44 * Returns the Jetspeed User (same as getUser without cast)45 *46 * @return the current user.47 */48publicJetspeedUser getJetspeedUser();
4950/***51 * Returns the portlet id referenced in this request52 *53 * @return the portlet id referenced or null54 */55public String getPortlet();
5657/***58 * Returns the portlet id (PEID) referenced in this request59 *60 * @return the portlet id (PEID) referenced or null61 */62public String getJs_peid();
6364/***65 * Sets the portlet id referenced for this request66 *67 * @param id the portlet id referenced in this request68 */69publicvoid setPortlet(String id);
7071/***72 * Sets the portlet id (PEID) referenced for this request73 *74 * @param id the portlet id (PEID) referenced in this request75 */76publicvoid setJs_peid(String peid);
7778/***79 * Returns the portlet id which should be customized for this request80 *81 * @return the portlet id being customized or null82 */83publicPortlet getCustomized();
8485/***86 * Sets the portlet id to customize87 *88 * @param id the portlet id to customize or null;89 */90publicvoid setCustomized(Portlet p);
9192/***93 * Get the psml profile being customized.94 * @return the Profile being customized.95 */96publicProfile getCustomizedProfile();
9798/***99 * Set the psml profile being customized.100 * @param profile The Profile being customized.101 */102publicvoid setCustomizedProfile(Profile profile);
103104/***105 * Clean up from customization106 */107publicvoid cleanupFromCustomization();
108109/***110 * Returns the portlet id which should be maximized for this request111 *112 * @return the portlet id being maximized or null113 */114publicint getMode();
115116/***117 * Sets the portlet id to maximize118 *119 * @param id the portlet id to maximize or null;120 */121publicvoid setMode(int mode);
122123/***124 * Sets the portlet id to maximize125 *126 * @param id the portlet id to maximize or null;127 */128publicvoid setMode(String mode);
129130/***131 * Returns the template path as requested from the parameters132 */133public String getRequestedTemplate();
134135/***136 * Sets the template path as requested from the parameters137 */138publicvoid setRequestedTemplate(String id);
139140/***141 * Returns the capability map for the user agent issuing this request142 *143 * @return a capability map objet144 */145publicCapabilityMap getCapability();
146147/***148 * Gets the user portal profile for the current request149 *150 * @return a profile implementation for the current request151 */152publicProfile getProfile();
153154/***155 * Sets the user portal profile for the current request156 *157 * @param profile a profile implementation for the current request158 */159publicvoid setProfile(Profile profile);
160161/***162 * Get the user id for the current user.163 * This method is provided as an abstraction to the very implementation164 * specific method of retrieving user ids in Turbine.165 *166 * @return String The current user's id.167 */168public String getUserId();
169170/***171 * Access an identifier for the current request's PageSession.172 * A PageSession is a specific portal page being viewed in a specific173 * user session (and perhaps, but not yet [@todo] in a specific browser window).174 * @return the identifier for the current request's PageSession.175 */176public String getPageSessionId();
177178/***179 * Access the current request's UserSession state object.180 * @return the current request's UserSession state object (may be null).181 */182publicSessionState getUserSessionState();
183184/***185 * Access the current request's PageSession state object.186 * @return the current request's PageSession state object (may be null).187 */188publicSessionState getPageSessionState();
189190/***191 * Access the current request's PortletSession state object.192 * @param id The Portlet's unique id.193 * @return the current request's PortletSession state object. (may be null).194 */195publicSessionState getPortletSessionState(String id);
196197 }
198