diff options
Diffstat (limited to 'simpleSigning/src/main/java/at/gv/egiz/simpleSigning/helper/SessionHelper.java')
-rw-r--r-- | simpleSigning/src/main/java/at/gv/egiz/simpleSigning/helper/SessionHelper.java | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/simpleSigning/src/main/java/at/gv/egiz/simpleSigning/helper/SessionHelper.java b/simpleSigning/src/main/java/at/gv/egiz/simpleSigning/helper/SessionHelper.java index bc86da6..0d06a36 100644 --- a/simpleSigning/src/main/java/at/gv/egiz/simpleSigning/helper/SessionHelper.java +++ b/simpleSigning/src/main/java/at/gv/egiz/simpleSigning/helper/SessionHelper.java @@ -22,6 +22,12 @@ public class SessionHelper { private static final String SESSION_TYPE_PDF = "PDF"; private static final String SESSION_TYPE_BASE64 = "B64"; + private static final String SESSION_SIG_POS_X = "SESSION_SIG_POS_X"; + private static final String SESSION_SIG_POS_Y = "SESSION_SIG_POS_Y"; + private static final String SESSION_SIG_POS_P = "SESSION_SIG_POS_P"; + private static final String SESSION_SIG_POS_W = "SESSION_SIG_POS_W"; + private static final String SESSION_SIG_POS_F = "SESSION_SIG_POS_F"; + private static final Logger logger = LoggerFactory .getLogger(SessionHelper.class); @@ -171,4 +177,61 @@ public class SessionHelper { logger.info("Killing Session: " + request.getSession().getId()); request.getSession().invalidate(); } + + public static void setSigPosX(HttpServletRequest request, String value) { + request.getSession().setAttribute(SESSION_SIG_POS_X, value); + } + public static void setSigPosY(HttpServletRequest request, String value) { + request.getSession().setAttribute(SESSION_SIG_POS_Y, value); + } + public static void setSigPosP(HttpServletRequest request, String value) { + request.getSession().setAttribute(SESSION_SIG_POS_P, value); + } + public static void setSigPosW(HttpServletRequest request, String value) { + request.getSession().setAttribute(SESSION_SIG_POS_W, value); + } + public static void setSigPosF(HttpServletRequest request, String value) { + request.getSession().setAttribute(SESSION_SIG_POS_F, value); + } + + public static String getSigPosX(HttpServletRequest request) { + Object s = request.getSession().getAttribute(SESSION_SIG_POS_X); + if (s != null) { + return s.toString(); + } else { + return null; + } + } + public static String getSigPosY(HttpServletRequest request) { + Object s = request.getSession().getAttribute(SESSION_SIG_POS_Y); + if (s != null) { + return s.toString(); + } else { + return null; + } + } + public static String getSigPosP(HttpServletRequest request) { + Object s = request.getSession().getAttribute(SESSION_SIG_POS_P); + if (s != null) { + return s.toString(); + } else { + return null; + } + } + public static String getSigPosW(HttpServletRequest request) { + Object s = request.getSession().getAttribute(SESSION_SIG_POS_W); + if (s != null) { + return s.toString(); + } else { + return null; + } + } + public static String getSigPosF(HttpServletRequest request) { + Object s = request.getSession().getAttribute(SESSION_SIG_POS_F); + if (s != null) { + return s.toString(); + } else { + return null; + } + } } |