Package org.g4studio.common.util

Examples of org.g4studio.common.util.SessionContainer


   *
   * @param form
   * @param obj
   */
  protected SessionContainer getSessionContainer(HttpServletRequest request) {
    SessionContainer sessionContainer = (SessionContainer) this.getSessionAttribute(request, "SessionContainer");
    if (sessionContainer == null) {
      sessionContainer = new SessionContainer();
      HttpSession session = request.getSession(true);
      session.setAttribute("SessionContainer", sessionContainer);
    }
    return sessionContainer;
  }
View Full Code Here


    String activeOnTop = "true";
    if ("0".equals(WebUtils.getParamValue("WEST_CARDMENU_ACTIVEONTOP", request))) {
      activeOnTop = "false";
    }
    dto.put("activeOnTop", activeOnTop);
    SessionContainer sessionContainer = WebUtils.getSessionContainer(request);
    String userid = sessionContainer.getUserInfo().getUserid();
    Dto dto2 = new BaseDto();
    dto2.put("userid", userid);
    String account = sessionContainer.getUserInfo().getAccount();
    account = account == null ? "" : account;
    String accountType = SystemConstants.ACCOUNTTYPE_NORMAL;
    if (account.equalsIgnoreCase(WebUtils.getParamValue("DEFAULT_ADMIN_ACCOUNT", request))) {
      accountType = SystemConstants.ACCOUNTTYPE_SUPER;
    } else if (account.equalsIgnoreCase(WebUtils.getParamValue("DEFAULT_DEVELOP_ACCOUNT", request))) {
      accountType = SystemConstants.ACCOUNTTYPE_DEVELOPER;
    }
    dto2.put("accountType", accountType);
    dto.put("accountType", accountType);
    List cardList = tagSupportService.getCardList(dto2).getDefaultAList();
    for (int i = 0; i < cardList.size(); i++) {
      MenuVo cardVo = (MenuVo) cardList.get(i);
      if (i != cardList.size() - 1) {
        cardVo.setIsNotLast("true");
      }
    }
    dto.put("date", G4Utils.getCurDate());
    dto.put("week", G4Utils.getWeekDayByDate(G4Utils.getCurDate()));
    dto.put("welcome", getWelcomeMsg());
    dto.put("cardList", cardList);
    dto.put("username", sessionContainer.getUserInfo().getUsername());
    dto.put("account", sessionContainer.getUserInfo().getAccount());
    Dto qDto = new BaseDto();
    qDto.put("deptid", sessionContainer.getUserInfo().getDeptid());
    dto.put("deptname", tagSupportService.getDepartmentInfo(qDto).getAsString("deptname"));
    Dto themeDto = new BaseDto();
    themeDto.put("userid", WebUtils.getSessionContainer(request).getUserInfo().getUserid());
    Dto resultDto = new BaseDto();
    resultDto = tagSupportService.getEauserSubInfo(themeDto);
View Full Code Here

   * @param rootMenuId
   */
  private String generateCardTrees(Dto pDto) {
    Reader sqlRunner = (Reader) SpringBeanLoader.getSpringBean("g4Reader");
    HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
    SessionContainer sessionContainer = WebUtils.getSessionContainer(request);
    String userid = sessionContainer.getUserInfo().getUserid();
    Dto qDto = new BaseDto();
    qDto.put("userid", userid);
    List cardList = (List) pDto.get("cardList");
    String treesString = scriptStart + "Ext.onReady(function(){";
    for (int i = 0; i < cardList.size(); i++) {
View Full Code Here

      delDto.put("sessionid", seid);
      if(!seid.equalsIgnoreCase(request.getSession().getId())){
        monitorService.deleteHttpSession(delDto);
        HttpSession session = SessionListener.getSessionByID(seid);
        if(G4Utils.isNotEmpty(seid)){
          SessionContainer sessionContainer =  (SessionContainer)session.getAttribute("SessionContainer");
          sessionContainer.setUserInfo(null); //配合RequestFilter进行拦截
          sessionContainer.cleanUp();
        }
      }else {
        msg += " 提示:不能杀死当前用户!";
      }
    }
View Full Code Here

TOP

Related Classes of org.g4studio.common.util.SessionContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.