KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > wsrp > consumer > templates > PortletSessionTemplate


1 /*
2 * Copyright 2001-2004 The eXo platform SARL All rights reserved.
3 * Please look at license.txt in info directory for more license detail.
4 */

5
6 package org.exoplatform.services.wsrp.consumer.templates;
7
8
9 import java.util.Map JavaDoc;
10 import java.util.HashMap JavaDoc;
11 import java.util.Iterator JavaDoc;
12 import org.exoplatform.services.wsrp.consumer.PortletSession;
13 import org.exoplatform.services.wsrp.consumer.PortletWindowSession;
14 import org.exoplatform.services.wsrp.type.SessionContext;
15
16 /*
17  * @author Mestrallet Benjamin
18  * benjmestrallet@users.sourceforge.net
19  * Date: 9 févr. 2004
20  * Time: 15:50:57
21  */

22
23 public abstract class PortletSessionTemplate implements PortletSession{
24
25   protected String JavaDoc portletHandle;
26   private SessionContext sessionContext;
27   protected Map JavaDoc portletWindowSessions = new HashMap JavaDoc();
28
29   public String JavaDoc getPortletHandle() {
30     return portletHandle;
31   }
32
33   public void setPortletHandle(String JavaDoc portletHandle) {
34     this.portletHandle = portletHandle;
35   }
36
37   public SessionContext getSessionContext() {
38     return sessionContext;
39   }
40
41   public void setSessionContext(SessionContext sessionContext) {
42     this.sessionContext = sessionContext;
43   }
44
45   public abstract PortletWindowSession getPortletWindowSession(String JavaDoc windowID);
46
47   public Iterator JavaDoc getAllPorletWindowSessions() {
48     return portletWindowSessions.entrySet().iterator();
49   }
50
51   public PortletWindowSession removePortletWindowSession(String JavaDoc windowID) {
52     portletWindowSessions.remove(windowID);
53     return null;
54   }
55
56   public void removeAllPortletWindowSessions() {
57     portletWindowSessions.clear();
58   }
59
60
61 }
Popular Tags