Beispiel #1
0
  public static String getLoginId(HttpSession session) {
    String errMsg = "어드민 로그인 정보를 가져올 수 없습니다.";
    AdSession adSession = (AdSession) session.getAttribute(Constants.ADMIN_AUTH_SESSION_KEY);
    if (adSession == null) throw new NoticeException(errMsg);

    AdMgr adMgr = adSession.getAdMgr();
    if (adMgr == null || StringUtils.isEmpty(adMgr.getMgrId())) throw new NoticeException(errMsg);
    return adMgr.getMgrId();
  }
Beispiel #2
0
  /**
   * Login Info Get
   *
   * @param session
   * @return
   * @throws ServiceException
   */
  public static AdMgr getAdMgr(HttpSession session) throws ServiceException {

    AdSession adSession = (AdSession) session.getAttribute(Constants.ADMIN_AUTH_SESSION_KEY);
    if (adSession == null) throw new NoticeException("어드민 로그인 정보를 가져올 수 없습니다.");

    AdMgr adMgr = adSession.getAdMgr();
    if (adMgr == null || StringUtils.isEmpty(adMgr.getMgrId()))
      throw new NoticeException("어드민 로그인 정보를 가져올 수 없습니다.");

    return adMgr;
  }