1 5 6 package org.exoplatform.services.wsrp.consumer.templates; 7 8 9 import java.util.Map ; 10 import java.util.HashMap ; 11 import java.util.Iterator ; 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 22 23 public abstract class PortletSessionTemplate implements PortletSession{ 24 25 protected String portletHandle; 26 private SessionContext sessionContext; 27 protected Map portletWindowSessions = new HashMap (); 28 29 public String getPortletHandle() { 30 return portletHandle; 31 } 32 33 public void setPortletHandle(String 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 windowID); 46 47 public Iterator getAllPorletWindowSessions() { 48 return portletWindowSessions.entrySet().iterator(); 49 } 50 51 public PortletWindowSession removePortletWindowSession(String windowID) { 52 portletWindowSessions.remove(windowID); 53 return null; 54 } 55 56 public void removeAllPortletWindowSessions() { 57 portletWindowSessions.clear(); 58 } 59 60 61 } | Popular Tags |