Package com.boco.bomc.vpn.domain

Examples of com.boco.bomc.vpn.domain.UserContext


   * @param password
   * @param smspasswd
   * @throws Exception
   */
  private void initSession(String username,String password,String smspasswd) throws Exception{
    UserContext currentUser = new UserContext(username,password,smspasswd);
    HttpSession session = ActionContext.getActionContext().getHttpServletRequest().getSession();
    Map<String,Object> acctMap = (Map<String,Object>)session.getAttribute("acctMap");
    if(acctMap==null)
      throw new Exception("�޷���SESSION�л�ȡ�û���ϢacctMap!");
    List<Map<String,Object>> subAccts = (List<Map<String,Object>>)acctMap.get("SUBACCTS");
    if(subAccts==null)
      throw new Exception("�޷���ȡ�û���¼��BOMC���˺��б���ϢSUBACCTS!");
    for(Map<String,Object> map:subAccts){
      logger.info("���ʺ�["+username+"]�¹�BOMC���˺���Ϣ--start��");
      logger.info("���˺�[APPACCTID]��"+map.get("APPACCTID"));
      logger.info("���˺�[NAME]��"+map.get("NAME"));
      logger.info("���˺�[LOCK]��"+map.get("LOCK"));
      logger.info("���ʺ�["+username+"]�¹�BOMC���˺���Ϣ--end��");
    }
    currentUser.setSubAcct(subAccts);
    session.setAttribute("SESSION_USER", currentUser);
  }
View Full Code Here


  @Mapping("/u/approve/$1/$2")
  public Renderer enable4AUser(String loginname,String approve){
   
    HttpServletRequest request = ActionContext.getActionContext().getHttpServletRequest();
    HttpSession session = ActionContext.getActionContext().getHttpSession();
    UserContext userContext = (UserContext)session.getAttribute("SESSION_USER");
   
    if(userContext==null){
      String json = "{\"status\":\"0\",\"message\":\"���¼����!\",\"result\":\"{��ǰ�û�δ��¼}\"}";
      return new TextRenderer(json);
    }
View Full Code Here

  @Mapping("/advice")
  public Renderer saveAdvice() {
   
    HttpServletRequest request = ActionContext.getActionContext().getHttpServletRequest();
    HttpSession session = ActionContext.getActionContext().getHttpSession();
    UserContext userContext = (UserContext)session.getAttribute("SESSION_USER");
   
    if(userContext==null){
      String json = "{\"status\":\"0\",\"message\":\"���¼������!\",\"result\":\"{��ǰ�û�δ��¼}\"}";
      return new TextRenderer(json);
    }
    String loginname = userContext.getUsername();
    String adviceStr = request.getParameter("content");
    String parentId = request.getParameter("parentId");
   
    Advice advice = new Advice();
    advice.setCreate_time(new Date());
View Full Code Here

  @Mapping("/advices")
  public Renderer getAdvices(){
   
    HttpServletRequest request = ActionContext.getActionContext().getHttpServletRequest();
    HttpSession session = ActionContext.getActionContext().getHttpSession();
    UserContext userContext = (UserContext)session.getAttribute("SESSION_USER");
   
    if(userContext==null){
      String json = "{\"status\":\"0\",\"message\":\"���¼����!\",\"result\":\"{��ǰ�û�δ��¼}\"}";
      return new TextRenderer(json);
    }
View Full Code Here

TOP

Related Classes of com.boco.bomc.vpn.domain.UserContext

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.