public static CommentJsonBean renderedShortBean(Comment comment, JiraBaseUrls urls,
ProjectRoleManager projectRoleManager, DateTimeFormatterFactory dateTimeFormatterFactory,
RendererManager rendererManager, String rendererType, IssueRenderContext renderContext,
ApplicationUser loggedInUser, EmailFormatter emailFormatter)
{
if (comment == null)
{
return null;
}
final CommentJsonBean bean = new CommentJsonBean();
addNonRenderableStuff(bean, comment, urls, projectRoleManager, loggedInUser, emailFormatter);
if (StringUtils.isNotBlank(rendererType))
{
bean.body = rendererManager.getRenderedContent(rendererType, comment.getBody(), renderContext);
}
else
{
bean.body = comment.getBody();
}
bean.created = comment.getCreated() == null ? "" : dateTimeFormatterFactory.formatter().forLoggedInUser().format(comment.getCreated());
bean.updated = comment.getUpdated() == null ? "" : dateTimeFormatterFactory.formatter().forLoggedInUser().format(comment.getUpdated());
return bean;
}