Class DefaultRssFeedRenderer

java.lang.Object
io.micronaut.rss.DefaultRssFeedRenderer
All Implemented Interfaces:
RssFeedRenderer
Direct Known Subclasses:
DefaultItunesPodcastRenderer

@Singleton public class DefaultRssFeedRenderer extends Object implements RssFeedRenderer
Implementation of RssFeedRenderer.
Since:
1.0
Author:
Sergio del Amo
  • Constructor Details

    • DefaultRssFeedRenderer

      public DefaultRssFeedRenderer()
  • Method Details

    • writeElement

      protected void writeElement(XMLStreamWriter sw, String localName, Object value)
      Parameters:
      sw - An XML Stream writer
      localName - The XML tag name
      value - The XML tag value
    • writeRssItemDescription

      protected void writeRssItemDescription(XMLStreamWriter sw, RssItem rssItem)
      Parameters:
      sw - An XML Stream writer
      rssItem - An RSS Item
    • shouldWrapDescriptionWithCData

      protected boolean shouldWrapDescriptionWithCData(@NonNull @NonNull String description)
      Parameters:
      description - RSS Item description
      Returns:
      Whether description should be wrapped with <![CDATA[ ]]
    • writeRssItem

      protected void writeRssItem(XMLStreamWriter sw, RssItem rssItem)
      Parameters:
      sw - An XML Stream writer
      rssItem - An RSS Item
    • getRssAttributes

      protected Map<String,String> getRssAttributes()
      Returns:
      RSS Attributes
    • writeCategory

      protected void writeCategory(XMLStreamWriter sw, List<String> categories, String tagName)
      Parameters:
      sw - XML stream writter
      categories - the RSS Categories
      tagName - the XML tag
    • writeRssChannel

      protected void writeRssChannel(XMLStreamWriter sw, RssChannel rssChannel)
      Parameters:
      sw - An XML Stream writer
      rssChannel - An RSS Channel
    • render

      public void render(Writer writer, RssChannel rssChannel)
      Description copied from interface: RssFeedRenderer
      Writes an RSS channel to a Writer.
      Specified by:
      render in interface RssFeedRenderer
      Parameters:
      writer - A Writer to write the RSS feed into
      rssChannel - The RSS channel to render