Ejemplo n.º 1
0
  protected Map<String, Object> getData() {
    Map<String, Object> data = null;

    if (_data != null) {
      data = new HashMap<>(_data);
    } else {
      data = new HashMap<>(1);
    }

    if (_useDialog && Validator.isNull(data.get("title"))) {
      String message = getProcessedMessage();

      ResourceBundle resourceBundle = TagResourceBundleUtil.getResourceBundle(pageContext);

      if (_localizeMessage) {
        message = LanguageUtil.get(resourceBundle, message);
      }

      data.put("title", HtmlUtil.stripHtml(message));
    }

    return data;
  }
  @Override
  public String getSummary(PortletRequest portletRequest, PortletResponse portletResponse) {

    Locale locale = getLocale(portletRequest);

    String summary = _article.getDescription(locale);

    if (Validator.isNotNull(summary)) {
      return summary;
    }

    try {
      PortletRequestModel portletRequestModel = null;
      ThemeDisplay themeDisplay = null;

      if ((portletRequest != null) && (portletResponse != null)) {
        portletRequestModel = new PortletRequestModel(portletRequest, portletResponse);
        themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);
      }

      JournalArticleDisplay articleDisplay =
          JournalArticleLocalServiceUtil.getArticleDisplay(
              _article,
              null,
              null,
              LanguageUtil.getLanguageId(locale),
              1,
              portletRequestModel,
              themeDisplay);

      summary = StringUtil.shorten(HtmlUtil.stripHtml(articleDisplay.getContent()), 200);
    } catch (Exception e) {
    }

    return summary;
  }
  @Override
  public String getSummary(PortletRequest portletRequest, PortletResponse portletResponse) {

    return HtmlUtil.stripHtml(_category.getDescription());
  }
 @Override
 public String getTitle(Locale locale) {
   return HtmlUtil.stripHtml(_rootMessage.getSubject());
 }
Ejemplo n.º 5
0
 public String getSummary() {
   return HtmlUtil.stripHtml(_entry.getContent());
 }
Ejemplo n.º 6
0
 public String getSummary() {
   return HtmlUtil.stripHtml(_image.getDescription());
 }