public void storeLoggedAccountAndDefaultProject( GPAccount account, Long projectID, HttpServletRequest httpServletRequest) { HttpSession session = httpServletRequest.getSession(); // TODO: Set the right time in seconds before session interrupt session.setMaxInactiveInterval(SESSIONE_EXPIRATION); session.setAttribute(SessionProperty.LOGGED_ACCOUNT.toString(), account); session.setAttribute(SessionProperty.DEFAULT_PROJECT.toString(), projectID); }
public Long getDefaultProject(HttpServletRequest httpServletRequest) throws GPSessionTimeout { HttpSession session = httpServletRequest.getSession(); Long projectId = (Long) session.getAttribute(SessionProperty.DEFAULT_PROJECT.toString()); if (projectId != null) { return projectId; } else { System.out.println("\n*** Session Project ID null ***"); throw new GPSessionTimeout("Session Timeout"); } }