Package io.micronaut.rss
Class DefaultRssFeedRenderer
java.lang.Object
io.micronaut.rss.DefaultRssFeedRenderer
- All Implemented Interfaces:
RssFeedRenderer
- Direct Known Subclasses:
DefaultItunesPodcastRenderer
Implementation of
RssFeedRenderer
.- Since:
- 1.0
- Author:
- Sergio del Amo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
render
(Writer writer, RssChannel rssChannel) Writes an RSS channel to aWriter
.protected boolean
shouldWrapDescriptionWithCData
(@NonNull String description) protected void
writeCategory
(XMLStreamWriter sw, List<String> categories, String tagName) protected void
writeElement
(XMLStreamWriter sw, String localName, Object value) protected void
writeRssChannel
(XMLStreamWriter sw, RssChannel rssChannel) protected void
writeRssItem
(XMLStreamWriter sw, RssItem rssItem) protected void
writeRssItemDescription
(XMLStreamWriter sw, RssItem rssItem)
-
Constructor Details
-
DefaultRssFeedRenderer
public DefaultRssFeedRenderer()
-
-
Method Details
-
writeElement
- Parameters:
sw
- An XML Stream writerlocalName
- The XML tag namevalue
- The XML tag value
-
writeRssItemDescription
- Parameters:
sw
- An XML Stream writerrssItem
- An RSS Item
-
shouldWrapDescriptionWithCData
- Parameters:
description
- RSS Item description- Returns:
- Whether description should be wrapped with <![CDATA[ ]]
-
writeRssItem
- Parameters:
sw
- An XML Stream writerrssItem
- An RSS Item
-
getRssAttributes
- Returns:
- RSS Attributes
-
writeCategory
- Parameters:
sw
- XML stream writtercategories
- the RSS CategoriestagName
- the XML tag
-
writeRssChannel
- Parameters:
sw
- An XML Stream writerrssChannel
- An RSS Channel
-
render
Description copied from interface:RssFeedRenderer
Writes an RSS channel to aWriter
.- Specified by:
render
in interfaceRssFeedRenderer
- Parameters:
writer
- A Writer to write the RSS feed intorssChannel
- The RSS channel to render
-