protected String getDDMContentSummary( Document document, Locale snippetLocale, PortletRequest portletRequest, PortletResponse portletResponse) { String content = StringPool.BLANK; if ((portletRequest == null) || (portletResponse == null)) { return content; } try { String articleId = document.get(Field.ARTICLE_ID); long groupId = GetterUtil.getLong(document.get(Field.GROUP_ID)); double version = GetterUtil.getDouble(document.get(Field.VERSION)); PortletRequestModel portletRequestModel = new PortletRequestModel(portletRequest, portletResponse); ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); JournalArticleDisplay articleDisplay = _journalContent.getDisplay( groupId, articleId, version, null, Constants.VIEW, LocaleUtil.toLanguageId(snippetLocale), 1, portletRequestModel, themeDisplay); content = articleDisplay.getDescription(); content = HtmlUtil.replaceNewLine(content); if (Validator.isNull(content)) { content = HtmlUtil.extractText(articleDisplay.getContent()); } } catch (Exception e) { if (_log.isDebugEnabled()) { _log.debug(e, e); } } return content; }