Package org.osforce.connect.entity.discussion

Examples of org.osforce.connect.entity.discussion.Reply


      model.put("forum", forum);
    } else if(StringUtils.equals(Topic.NAME, activity.getEntity())) {
      Topic topic = topicService.getTopic(activity.getLinkedId());
      model.put("topic", topic);
    } else if(StringUtils.equals(Reply.NAME, activity.getEntity())) {
      Reply reply = replyService.getReply(activity.getLinkedId());
      model.put("reply", reply);
    } else if(StringUtils.equals(TeamMember.NAME, activity.getEntity())) {
      TeamMember teamMember = memberService.getMember(activity.getLinkedId());
      model.put("teamMember", teamMember);
    } else if(StringUtils.equals(Event.NAME, activity.getEntity())) {
View Full Code Here


    if(reply.getTopicId()!=null) {
      Topic topic = topicDao.get(reply.getTopicId());
      reply.setTopic(topic);
    }
    if(reply.getQuoteId()!=null) {
      Reply quote = replyDao.get(reply.getQuoteId());
      reply.setQuote(quote);
    }
    Date now = new Date();
    reply.setEntered(now);
    if(reply.getId()==null) {
View Full Code Here

    updateTopic(topic);
  }

  public void updateTopic(Topic topic) {
    if(topic.getAnswerId()!=null) {
      Reply answer = replyDao.get(topic.getAnswerId());
      topic.setAnswer(answer);
    }
    if(topic.getEnteredId()!=null) {
      User enteredBy = userDao.get(topic.getEnteredId());
      topic.setEnteredBy(enteredBy);
View Full Code Here

  }

  @Override
  protected void doTask(Map<Object, Object> context) throws Exception {
    Long replyId = (Long) context.get("replyId");
    Reply reply = replyService.getReply(replyId);
    String template = (String) context.get("template");
    Activity activity = new Activity();
    activity.setLinkedId(replyId);
    activity.setEntity(Reply.NAME);
    activity.setType(Reply.NAME);
    activity.setDescription(template);
    activity.setFormat(Activity.FORMAT_FTL);
    activity.setProjectId(reply.getTopic().getForum().getProjectId());
    activity.setEnteredId(reply.getModifiedId());
    activityService.createActivity(activity);
  }
View Full Code Here

  }

  @AfterReturning("execution(* org.osforce.connect.service.discussion.ReplyService.createReply(..)) ||"
      + "execution(* org.osforce.connect.service.discussion.ReplyService.updateReply(..))")
  public void updateReply(JoinPoint jp) {
    Reply reply = (Reply) jp.getArgs()[0];
    Map<Object, Object> context = CollectionUtil.newHashMap();
    context.put("replyId", reply.getId());
    context.put("template", TEMPLATE_REPLY_UPDATE);
    replyActivityStreamTask.doAsyncTask(context);
    //
    replyCreateEmailTask.doAsyncTask(context);
  }
View Full Code Here

  @Override
  protected void prepareMessage(MimeMessageHelper helper,
      Map<Object, Object> context) throws Exception {
    Long replyId = (Long) context.get("replyId");
    Reply reply = replyService.getReply(replyId);
    context.put("topic", reply.getTopic());
    context.put("reply", reply);
    context.put("site", reply.getTopic().getForum().getProject().getCategory().getSite());
    helper.addTo(reply.getTopic().getEnteredBy().getEmail(),
        reply.getTopic().getEnteredBy().getNickname());
    //
    String subject = FreeMarkerTemplateUtils.processTemplateIntoString(
        configuration.getTemplate(REPLY_CREATE_SUBJECT), context);
    String content = FreeMarkerTemplateUtils.processTemplateIntoString(
        configuration.getTemplate(REPLY_CREATE_CONTENT), context);
View Full Code Here

TOP

Related Classes of org.osforce.connect.entity.discussion.Reply

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.