01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/portal/tags/sakai_2-4-1/portal-render-impl/impl/src/java/org/sakaiproject/portal/render/portlet/SakaiPortletWindow.java $
03: * $Id: SakaiPortletWindow.java 29143 2007-04-19 01:10:38Z ajpoland@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 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.portal.render.portlet;
21:
22: import javax.portlet.PortletMode;
23: import javax.portlet.WindowState;
24:
25: import org.apache.pluto.PortletWindow;
26: import org.apache.pluto.PortletWindowID;
27: import org.sakaiproject.portal.render.portlet.services.state.PortletState;
28:
29: /**
30: * @author ddwolf
31: * @since Sakai 2.4
32: * @version $Rev: 29143 $
33: */
34: public class SakaiPortletWindow implements PortletWindow {
35:
36: private String contextPath;
37:
38: private String portletName;
39:
40: private PortletState state;
41:
42: public SakaiPortletWindow(String windowId, String contextPath,
43: String portletName) {
44: this .contextPath = contextPath;
45: this .portletName = portletName;
46: this .state = new PortletState(windowId);
47: }
48:
49: public PortletState getState() {
50: return state;
51: }
52:
53: public void setState(PortletState state) {
54: this .state = state;
55: }
56:
57: public PortletWindowID getId() {
58: return new SakaiPortletWindowId();
59: }
60:
61: public String getContextPath() {
62: return contextPath;
63: }
64:
65: public String getPortletName() {
66: return portletName;
67: }
68:
69: public WindowState getWindowState() {
70: return state.getWindowState();
71: }
72:
73: public PortletMode getPortletMode() {
74: return state.getPortletMode();
75: }
76:
77: class SakaiPortletWindowId implements PortletWindowID {
78: public String getStringId() {
79: return state.getId();
80: }
81: }
82: }
|