Package com.day.cq.commons.feed
Class RssFeed
- java.lang.Object
 - 
- com.day.cq.commons.feed.AbstractFeed
 - 
- com.day.cq.commons.feed.RssFeed
 
 
 
- 
- All Implemented Interfaces:
 Feed
public class RssFeed extends AbstractFeed
TheRssFeedclass prints a resource as an RSS feed. 
- 
- 
Field Summary
- 
Fields inherited from interface com.day.cq.commons.feed.Feed
DEFAULT_CHARACTER_ENCODING, DEFAULT_CONTENT_TYPE, SELECTOR_ATOM, SELECTOR_FEED, SELECTOR_FEEDENTRY, SELECTOR_RSS, SUFFIX_COMMENTS, SUFFIX_FEED, SUFFIX_FEEDENTRY, SUFFIX_HTML, SUFFIX_XML 
 - 
 
- 
Constructor Summary
Constructors Constructor Description RssFeed(Resource res, SlingHttpServletRequest req, SlingHttpServletResponse resp)Creates a newRssFeedinstance using the specified resource, servlet request and response.RssFeed(SlingHttpServletRequest req, SlingHttpServletResponse resp)Creates a newRssFeedinstance using the specified servlet request and response. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetContentType()Returns the content type of the feed.voidprintEntry()Prints the current resource as a feed entry.voidprintHeader()Writes the feed header.- 
Methods inherited from class com.day.cq.commons.feed.AbstractFeed
getCharacterEncoding, printChildEntries, printChildEntries, printEntries, printEntries, printEntry, printFooter 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
RssFeed
public RssFeed(SlingHttpServletRequest req, SlingHttpServletResponse resp) throws javax.jcr.RepositoryException
Creates a newRssFeedinstance using the specified servlet request and response.- Parameters:
 req- The servlet requestresp- The servlet response- Throws:
 javax.jcr.RepositoryException- if no node can be found
 
- 
RssFeed
public RssFeed(Resource res, SlingHttpServletRequest req, SlingHttpServletResponse resp) throws javax.jcr.RepositoryException
Creates a newRssFeedinstance using the specified resource, servlet request and response.- Parameters:
 res- The resourcereq- The servlet requestresp- The servlet response- Throws:
 javax.jcr.RepositoryException- if no node can be found
 
 - 
 
- 
Method Detail
- 
printHeader
public void printHeader() throws java.io.IOExceptionWrites the feed header.- Throws:
 java.io.IOException- If output fails
 
- 
printEntry
public void printEntry() throws java.io.IOExceptionPrints the current resource as a feed entry.- Throws:
 java.io.IOException- If output fails
 
- 
getContentType
public java.lang.String getContentType()
Returns the content type of the feed.- Specified by:
 getContentTypein interfaceFeed- Overrides:
 getContentTypein classAbstractFeed- Returns:
 - The type
 
 
 - 
 
 -