1 20 package org.enhydra.barracuda.core.util.http; 21 22 import javax.servlet.*; 23 import javax.servlet.http.*; 24 25 import org.enhydra.barracuda.core.comp.ViewContext; 26 import org.enhydra.barracuda.core.event.ControlEventContext; 27 import org.enhydra.barracuda.plankton.data.ReferenceFactory; 28 29 30 37 public class SessionServices extends org.enhydra.barracuda.plankton.http.SessionServices { 38 39 49 public static HttpSession getSession(ViewContext vc) { 50 return getSession(((ControlEventContext) vc.getEventContext()).getRequest()); 51 } 52 53 63 public static HttpSession getSession(ViewContext vc, boolean create) { 64 return getSession(((ControlEventContext) vc.getEventContext()).getRequest(), create); 65 } 66 67 79 public static HttpSession getSession(ViewContext vc, boolean create, Integer timeout) { 80 return getSession(((ControlEventContext) vc.getEventContext()).getRequest(), create, timeout); 81 } 82 83 84 95 public static Object getObjectFromCache(ControlEventContext context, Object key, ReferenceFactory factory) { 96 HttpSession session = SessionServices.getSession(context.getRequest()); 97 return getObjectFromCache(session, key, factory); 98 } 99 100 } 101 | Popular Tags |