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 and Description |
---|
AbstractFeed(Resource res,
SlingHttpServletRequest req,
SlingHttpServletResponse resp)
Creates a new feed instance using the specified resource.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCharacterEncoding()
Returns the character encoding of the feed.
|
java.lang.String |
getContentType()
Returns the content type of the feed.
|
void |
printChildEntries()
Prints the children of the current resource as feed entries
|
void |
printChildEntries(int max)
Prints the children of the current resource as feed entries
|
void |
printEntries(java.util.Iterator<Resource> iter)
Prints the specified resources as feed entries
|
void |
printEntries(java.util.Iterator<Resource> iter,
int max)
Prints the specified resources as feed entries
|
void |
printEntry(Resource res)
Prints the specified resource as a feed entry
|
void |
printFooter()
Writes the feed footer.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
printEntry, printHeader
public AbstractFeed(Resource res, SlingHttpServletRequest req, SlingHttpServletResponse resp) throws RepositoryException
res
- The resourcereq
- The servlet requestresp
- The servlet responseRepositoryException
- if no node can be foundpublic java.lang.String getContentType()
getContentType
in interface Feed
public java.lang.String getCharacterEncoding()
getCharacterEncoding
in interface Feed
public void printEntry(Resource res) throws java.io.IOException
printEntry
in interface Feed
res
- the resourcejava.io.IOException
- If output failspublic void printChildEntries() throws java.io.IOException
printChildEntries
in interface Feed
java.io.IOException
- If output failspublic void printChildEntries(int max) throws java.io.IOException
printChildEntries
in interface Feed
max
- The maximum number of entriesjava.io.IOException
- If output failspublic void printEntries(java.util.Iterator<Resource> iter) throws java.io.IOException
printEntries
in interface Feed
iter
- The resourcesjava.io.IOException
- If output failspublic void printEntries(java.util.Iterator<Resource> iter, int max) throws java.io.IOException
printEntries
in interface Feed
iter
- The resourcesmax
- The maximum number of entriesjava.io.IOException
- If output failspublic void printFooter() throws java.io.IOException
printFooter
in interface Feed
java.io.IOException
- If output failsCopyright © 2010 - 2020 Adobe. All Rights Reserved