コード例 #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;
  }
コード例 #2
0
  @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;
  }
コード例 #3
0
  @Override
  public String getSummary(PortletRequest portletRequest, PortletResponse portletResponse) {

    return HtmlUtil.stripHtml(_category.getDescription());
  }
コード例 #4
0
 @Override
 public String getTitle(Locale locale) {
   return HtmlUtil.stripHtml(_rootMessage.getSubject());
 }
コード例 #5
0
 public String getSummary() {
   return HtmlUtil.stripHtml(_entry.getContent());
 }
コード例 #6
0
 public String getSummary() {
   return HtmlUtil.stripHtml(_image.getDescription());
 }