1 16 package org.apache.cocoon.portal.wsrp.consumer; 17 18 import org.apache.avalon.framework.logger.Logger; 19 import org.apache.wsrp4j.consumer.PortletWindowSession; 20 import org.apache.wsrp4j.consumer.driver.GenericPortletSessionImpl; 21 import org.apache.wsrp4j.util.Modes; 22 import org.apache.wsrp4j.util.WindowStates; 23 24 34 public class PortletSessionImpl extends GenericPortletSessionImpl { 35 36 37 protected final Logger logger; 38 39 45 public PortletSessionImpl(String handle, Logger logger) { 46 super(handle); 47 this.logger = logger; 48 } 49 50 56 public PortletWindowSession getPortletWindowSession(String windowID) { 57 SimplePortletWindowSession session = (SimplePortletWindowSession)this.windowSessions.get(windowID); 58 if (session == null) { 59 session = new SimplePortletWindowSessionImpl(windowID, this); 60 session.setMode(Modes._view); 61 session.setWindowState(WindowStates._normal); 62 this.windowSessions.put(windowID, session); 63 64 if ( this.logger.isDebugEnabled() ) { 65 logger.debug("Created windowSession with ID: " + windowID); 66 } 67 } 68 return session; 69 } 70 } 71 | Popular Tags |