Package com.liusoft.dlog4j.beans

Examples of com.liusoft.dlog4j.beans.UserBean


   */
  public void doValidateLogin(ActionMapping mapping,
      ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception
  {
    UserBean loginUser = super.getLoginUser(request, response);
    outputPlainMsg(response, String.valueOf((loginUser!=null)?1:0));
  }
View Full Code Here


      throws Exception
  {
    GuestBookForm msgform = (GuestBookForm)form;
    super.validateClientId(request, msgform);
    if(StringUtils.isNotEmpty(msgform.getReply())){
      UserBean loginUser = super.getLoginUser(request, response);
      if(loginUser!=null){
        //�ж��Ƿ�Ϊվ��
        SiteBean site = SiteDAO.getSiteByID(msgform.getSid());
        if(site!=null && site.isOwner(loginUser)){
          //�ظ�����
View Full Code Here

      HttpServletRequest request, HttpServletResponse response, String s_msg_id)
      throws Exception
  {
    int msg_id = Integer.parseInt(s_msg_id);
    GuestBookForm msgform = (GuestBookForm)form;
    UserBean loginUser = super.getLoginUser(request, response);
    if(loginUser!=null && loginUser.getOwnSiteId()==msgform.getSid()){
      GuestBookDAO.deleteMsg(msgform.getSid(),msg_id);
    }
    String ext = null;
    if(msgform.getPage()>1)
      ext = "page=" + msgform.getPage();
View Full Code Here

    while(true){
      if(StringUtils.isEmpty(msgform.getContent())){
        msgs.add("content", new ActionMessage("error.empty_content"));
        break;
      }
      UserBean loginUser = super.getLoginUser(request, response);
      if(loginUser==null){
        msgs.add("message", new ActionMessage("error.user_not_login"));
        break;
      }
      else if(loginUser.getStatus()!=UserBean.STATUS_NORMAL){
        msgs.add("message", new ActionMessage("error.user_not_available"));
        break;
      }
      SiteBean site = super.getSiteByID(msgform.getSid());
      if(site==null){
View Full Code Here

  protected ActionForward doDeleteAll(ActionMapping mapping,
      ActionForm form, HttpServletRequest request,
      HttpServletResponse response, String s_status) throws Exception      
  {
    MessageForm msg = (MessageForm)form;
    UserBean loginUser = super.getLoginUser(request, response);
    if(loginUser!=null){
      try{
        int status = Integer.parseInt(s_status);
        MessageDAO.deleteMsgs(loginUser.getId(),status);
      }catch(Exception e){
        context().log("delete message where status is "+s_status+" failed.", e);
      }
    }
    return makeForward(mapping.findForward("msgs"), msg.getSid());
View Full Code Here

  protected ActionForward doDelete(ActionMapping mapping,
      ActionForm form, HttpServletRequest request,
      HttpServletResponse response, String s_msg_id) throws Exception      
  {
    MessageForm msg = (MessageForm)form;
    UserBean loginUser = super.getLoginUser(request, response);
    if(loginUser!=null){
      try{
        int msg_id = Integer.parseInt(s_msg_id);
        MessageDAO.deleteMsg(loginUser.getId(), msg_id);
      }catch(Exception e){
        context().log("delete message #"+s_msg_id+" failed.", e);
      }
    }
    String ext = null;
View Full Code Here

  protected ActionForward doDeleteMessages(ActionMapping mapping,
      ActionForm form, HttpServletRequest request,
      HttpServletResponse response) throws Exception      
  {
    MessageForm msg = (MessageForm)form;
    UserBean loginUser = super.getLoginUser(request, response);
    if(loginUser!=null){
      String[] mids = request.getParameterValues("mid");
      MessageDAO.deleteMsgs(loginUser.getId(), mids);
    }
    return makeForward(mapping.findForward("msgs"), msg.getSid());
  }
View Full Code Here

      }
      if(msgform.getReceiverId()==0 || msgform.getSid()==0){
        msgs.add("message", new ActionMessage("error.param"));
        break;
      }
      UserBean loginUser = super.getLoginUser(request, response);
      if(loginUser==null){
        msgs.add("message", new ActionMessage("error.user_not_login"));
        break;
      }
      else if(loginUser.getStatus()!=UserBean.STATUS_NORMAL){
        msgs.add("message", new ActionMessage("error.user_not_available"));
        break;
      }
      else if(DLOGSecurityManager.IllegalGlossary.existIllegalWord(msgform.getContent())){
        msgs.add("message", new ActionMessage("error.illegal_glossary"));
        break;
      }
      UserBean receiver = UserDAO.getUserByID(msgform.getReceiverId());
      if(receiver==null || receiver.getStatus()!=UserBean.STATUS_NORMAL){
        msgs.add("message", new ActionMessage("error.user_not_available"));
        break;
      }
      //�жϽ������Ƿ��Ѿ��������߼�Ϊ������
      if(UserDAO.isUserInBlackList(receiver.getId(), loginUser.getId())){
        msgs.add("message", new ActionMessage("message.sent"));
        break;
      }
      MessageBean msgbean = new MessageBean();
      String content = StringUtils.abbreviate(super.autoFiltrate(null,
View Full Code Here

      }
      if(msgform.getReceiverId()==0 || msgform.getSid()==0){
        msgs.add("message", new ActionMessage("error.param"));
        break;
      }
      UserBean loginUser = super.getLoginUser(request, response);
      if(loginUser==null){
        msgs.add("message", new ActionMessage("error.user_not_login"));
        break;
      }
      else if(loginUser.getStatus()!=UserBean.STATUS_NORMAL){
        msgs.add("message", new ActionMessage("error.user_not_available"));
        break;
      }
      else if(DLOGSecurityManager.IllegalGlossary.existIllegalWord(msgform.getContent())){
        msgs.add("message", new ActionMessage("error.illegal_glossary"));
        break;
      }
      UserBean receiver = UserDAO.getUserByID(msgform.getReceiverId());
      if(receiver==null || receiver.getStatus()!=UserBean.STATUS_NORMAL){
        msgs.add("message", new ActionMessage("error.user_not_available"));
        break;
      }
      //�жϽ������Ƿ��Ѿ��������߼�Ϊ������
      if(UserDAO.isUserInBlackList(receiver.getId(), loginUser.getId())){
        msgs.add("message", new ActionMessage("message.sent"));
        break;
      }
      MessageBean msgbean = new MessageBean();
      String content = StringUtils.abbreviate(super.autoFiltrate(null,
View Full Code Here

    super.validateClientId(request, user);
    ActionMessages msgs = new ActionMessages();
    // ��֤�û�ע���
    user.validateUserForm(request, msgs, true);
    if (msgs.isEmpty()) {
      UserBean ubean = user.formToBean();
      try {
        ubean.setLastAddr(request.getRemoteAddr());
        ubean.setMobile(RequestUtils.getRequestMobile(request));
        ubean.setResume(super.filterScriptAndStyle(ubean.getResume()));
        DLOGUserManager.create(ubean);
        // ִ�е�¼����
        UserLoginManager.loginUser(request, response, ubean, user.getKeepDays());
      } catch (Exception e) {
        msgs.add("result", new ActionMessage("error.database", e.getMessage()));
View Full Code Here

TOP

Related Classes of com.liusoft.dlog4j.beans.UserBean

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.