1 package org
.argeo
.cms
.internal
.http
;
3 import java
.util
.Locale
;
5 import javax
.security
.auth
.Subject
;
6 import javax
.servlet
.http
.HttpServletRequest
;
7 import javax
.servlet
.http
.HttpSession
;
9 import org
.argeo
.cms
.internal
.auth
.CmsSessionImpl
;
10 import org
.osgi
.service
.useradmin
.Authorization
;
12 /** CMS session implementation in a web context. */
13 public class WebCmsSessionImpl
extends CmsSessionImpl
{
14 // private final static Log log =
15 // LogFactory.getLog(WebCmsSessionImpl.class);
17 private HttpSession httpSession
;
19 public WebCmsSessionImpl(Subject initialSubject
, Authorization authorization
, Locale locale
,
20 HttpServletRequest request
) {
21 super(initialSubject
, authorization
, locale
, request
.getSession(false).getId());
22 httpSession
= request
.getSession(false);
26 public boolean isValid() {
29 try {// test http session
30 httpSession
.getCreationTime();
32 } catch (IllegalStateException ise
) {
37 public static CmsSessionImpl
getCmsSession(HttpServletRequest request
) {
38 return CmsSessionImpl
.getByLocalId(request
.getSession(false).getId());