01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/velocity/tags/sakai_2-4-1/tool/src/java/org/sakaiproject/cheftool/JetspeedRunData.java $
03: * $Id: JetspeedRunData.java 7247 2006-03-29 21:09:51Z ggolden@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.cheftool;
21:
22: import javax.servlet.http.HttpServletRequest;
23:
24: import org.sakaiproject.event.api.SessionState;
25: import org.sakaiproject.util.ParameterParser;
26:
27: public class JetspeedRunData extends RunData {
28: protected SessionState state = null;
29:
30: protected String pid = null;
31:
32: public JetspeedRunData(HttpServletRequest req, SessionState state,
33: String pid, ParameterParser params) {
34: super (req, params);
35: this .state = state;
36: this .pid = pid;
37: }
38:
39: // support the return of the SessionState by:
40: // SessionState state = ((JetspeedRunData)data).getPortletSessionState(((JetspeedRunData)data).getJs_peid());
41:
42: /**
43: * Access the current request's PortletSession state object.
44: *
45: * @param id
46: * The Portlet's unique id.
47: * @return the current request's PortletSession state object. (may be null).
48: */
49: public SessionState getPortletSessionState(String id) {
50: return state;
51: }
52:
53: /**
54: * Returns the portlet id (PEID) referenced in this request
55: *
56: * @return the portlet id (PEID) referenced or null
57: */
58: public String getJs_peid() {
59: return pid;
60: }
61: }
|