From 8662870179eed5ca6e2b7b10fd1912f922fce67b Mon Sep 17 00:00:00 2001 From: pdanner Date: Mon, 6 Dec 2010 16:59:57 +0000 Subject: Moved to pdf-as-web project git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@678 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../at/gv/egiz/pdfas/web/helper/SessionHelper.java | 47 ---------------------- 1 file changed, 47 deletions(-) delete mode 100644 src/main/java/at/gv/egiz/pdfas/web/helper/SessionHelper.java (limited to 'src/main/java/at/gv/egiz/pdfas/web/helper/SessionHelper.java') diff --git a/src/main/java/at/gv/egiz/pdfas/web/helper/SessionHelper.java b/src/main/java/at/gv/egiz/pdfas/web/helper/SessionHelper.java deleted file mode 100644 index ca09871..0000000 --- a/src/main/java/at/gv/egiz/pdfas/web/helper/SessionHelper.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * - */ -package at.gv.egiz.pdfas.web.helper; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import at.gv.egiz.pdfas.exceptions.web.SessionExpiredException; -import at.knowcenter.wag.egov.egiz.web.SessionAttributes; - -/** - * @author wprinz - * - */ -public class SessionHelper -{ - /** - * The log. - */ - private static Log log = LogFactory.getLog(SessionHelper.class); - - public static Object getSession(HttpServletRequest request) throws SessionExpiredException - { - - HttpSession session = request.getSession(false); - if (session == null) - { - String msg = "There is no session associated with this request."; //$NON-NLS-1$ - log.error(msg); - throw new SessionExpiredException(msg); - } - - Object sessionObject = session.getAttribute(SessionAttributes.ATTRIBUTE_SESSION_INFORMATION); - if (sessionObject == null) - { - String msg = "Unable to find session data in session " + session.getId(); - log.error(msg); - throw new SessionExpiredException(msg); - } - - return sessionObject; - } -} -- cgit v1.2.3