Example #1
0
 private void fillComment(ContextBuilder context, Comment comment) {
   context.put("id", comment.getId());
   context.put("text", wiki2html(comment.getText()));
   context.put("author", comment.getAuthorLabel());
   context.put(
       "date",
       comment
           .getDateAndTime()
           .toString(DateAndTime.FORMAT_WEEKDAY_LONGMONTH_DAY_YEAR_HOUR_MINUTE));
 }
Example #2
0
 private void onCommentChanged(GwtConversation conversation, Comment comment, Map properties) {
   conversation.getProject().updateHomepage(comment.getParent(), false);
   if (comment.isPublished() && properties.containsKey("published")) {
     subscriptionService.notifySubscribers(
         comment.getParent(),
         "New comment posted by " + comment.getAuthorLabel(),
         conversation.getProject(),
         null);
   }
 }