private ImmutableMap<Object, Object> createSearchResult(final I18NBean i18NBean, final FriendlyDateFormatter friendlyDateFormatter, ContentReportData contentReportData, final AbstractPage abstractPage) { final User creator = abstractPage.getCreator(); ImmutableMap.Builder<Object, Object> builder = ImmutableMap.builder() .put("title", abstractPage.getTitle()) .put("urlPath", contextPathHolder.getContextPath() + abstractPage.getUrlPath()) .put("creatorName", creator == null ? i18NBean.getText("anonymous.name") : creator.getName()) .put("creatorFullName", creator == null ? i18NBean.getText("anonymous.name") : creator.getFullName()) .put("friendlyModificationDate", i18NBean .getText(friendlyDateFormatter.getFormatMessage(abstractPage.getLastModificationDate()))) .put("sortableDate", Long.toString(abstractPage.getLastModificationDate().getTime())); if (contentReportData.hasCommentCounts()) { builder.put("commentCount", contentReportData.getCommentCount(abstractPage)); } if (contentReportData.hasLikeCounts()) { builder.put("likeCount", contentReportData.getLikeCount(abstractPage)); } return builder.build(); }