Package com.liusoft.dlog4j.beans

Examples of com.liusoft.dlog4j.beans.TopicBean


        break;
      if (tbean.getUser().getId() != loginUser.getId()
          && loginUser.getOwnSiteId() != tform.getSid())
        break;
      BBSTopicDAO.delete(tbean);
      TopicBean topic = new TopicBean();
      topic.setId(tbean.getId());
      SearchProxy.remove(topic);
      break;
    }
    StringBuffer ext = new StringBuffer();
    ext.append("fid=");
View Full Code Here


            new Integer(log.getForum())));
        break;
      }     
     
      // ����TopicBean
      TopicBean topic = new TopicBean();
      topic.setUser(loginUser);
      topic.setUsername(loginUser.getName());
      topic.setSite(site);
      // �Է����ı����Լ������Զ����������ִʹ���
      topic.setTitle(super.autoFiltrate(site, log.getTitle()));
      String content = StringUtils.abbreviate(super.autoFiltrate(null,
          log.getContent()), MAX_TOPIC_LENGTH);
      topic.setContent(super.filterScriptAndStyle(content));
      // FIXME: �����ؼ���̫���������ݿ�д��ʧ�ܵ�����
      topic.setKeyword(DLOGSecurityManager.IllegalGlossary
          .deleteIllegalWord(log.getSearchKey()));
      topic.setClient(new ClientInfo(request, log.getClientType()));
      topic.setCreateTime(new Date());
      topic.setForum(forum);
      topic.setStatus(TopicBean.STATUS_NORMAL);
      if(site.getOwner().getId()==loginUser.getId()){
        if (log.getTop() == 1)
          topic.setTop(true);
        if (log.getElite() == 1)
          topic.setElite(true);
      }
      BBSTopicDAO.create(topic, (log.getBookmark() == 1));

      // �����ϴ�����Ϣ
      pickupUploadFileItems(request, response, loginUser.getId(), site, topic
          .getId(), TopicBean.TYPE_BBS);
      break;
    }
    if (!msgs.isEmpty()) {
      saveMessages(request, msgs);
View Full Code Here

        msgs.add("content",
            new ActionMessage("error.empty_not_allowed"));
        break;
      }
      // ����û���Ȩ��
      TopicBean topic = BBSTopicDAO.getTopicByID(log.getId());
      if (topic != null) {
        if (topic.getUser().getId() != loginUser.getId()
            && loginUser.getOwnSiteId() != log.getSid()) {
          msgs.add("bbs", new ActionMessage("error.access_deny"));
          break;
        }
        // �Է����ı����Լ������Զ����������ִʹ���
        String title = super.autoFiltrate(topic.getSite(),log.getTitle());
        if (!StringUtils.equals(title, topic.getTitle()))
          topic.setTitle(title);
        String content = StringUtils.abbreviate(super.autoFiltrate(
            null, log.getContent()), MAX_TOPIC_LENGTH);       
        if (!StringUtils.equals(content, topic.getContent())){
          topic.setContent(super.filterScriptAndStyle(content));
          //�����ı�����(Winter Lau, 2006-5-12)
          TextCacheManager.updateTextContent(
              TopicBean.TYPE_BBS, topic.getId(), topic.getContent());
        }
        String keyword = super.autoFiltrate(topic.getSite(),log.getSearchKey());
        boolean updateTags = false;
        if (!StringUtils.equals(keyword, topic.getKeyword())) {
          topic.setKeyword(keyword);
          updateTags = true;
        }
        topic.setModifyTime(new Date());
        if(topic.getSite().getOwner().getId()==loginUser.getId()){
          topic.setTop(log.getTop() == 1);
          topic.setElite(log.getElite() == 1);
        }
        BBSTopicDAO.update(topic, updateTags);
      }
      break;
    }
View Full Code Here

        Date t = cal.getTime();
        Iterator objs = results.iterator();
        while(objs.hasNext()){
          Object obj = objs.next();
          if(obj instanceof TopicBean){
            TopicBean tb = (TopicBean)obj;
            if(tb.getCreateTime().before(t))
              objs.remove();
          }
          else if(obj instanceof TopicReplyBean){
            TopicReplyBean trb = (TopicReplyBean)obj;
            if(trb.getReplyTime().before(t))
View Full Code Here

TOP

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

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.