Package com.day.cq.commons.feed
Interface Feed
- 
- All Known Implementing Classes:
 AbstractFeed,AtomFeed,RssFeed
public interface FeedTheFeedinterface is used to print a resource as a feed. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_CHARACTER_ENCODINGThe default character encodingstatic java.lang.StringDEFAULT_CONTENT_TYPEThe default content typestatic java.lang.StringSELECTOR_ATOMThe request selector for Atom-formatted feeds (default)static java.lang.StringSELECTOR_FEEDThe request selector for feedsstatic java.lang.StringSELECTOR_FEEDENTRYThe request selector for feed entriesstatic java.lang.StringSELECTOR_RSSThe request selector for RSS-formatted feedsstatic java.lang.StringSUFFIX_COMMENTSThe suffix for comment linksstatic java.lang.StringSUFFIX_FEEDThe suffix for feed linksstatic java.lang.StringSUFFIX_FEEDENTRYThe suffix for feed entry linksstatic java.lang.StringSUFFIX_HTMLThe suffix for HTML linksstatic java.lang.StringSUFFIX_XMLThe suffix for XML links 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetCharacterEncoding()Returns the character encoding of the feed.java.lang.StringgetContentType()Returns the content type of the feed.voidprintChildEntries()Prints the children of the current resource as feed entriesvoidprintChildEntries(int max)Prints the children of the current resource as feed entriesvoidprintEntries(java.util.Iterator<Resource> iter)Prints the specified resources as feed entriesvoidprintEntries(java.util.Iterator<Resource> iter, int max)Prints the specified resources as feed entriesvoidprintEntry()Prints the current resource as a feed entry.voidprintEntry(Resource res)Prints the specified resource as a feed entryvoidprintFooter()Writes the feed footer.voidprintHeader()Writes the feed header. 
 - 
 
- 
- 
Field Detail
- 
DEFAULT_CONTENT_TYPE
static final java.lang.String DEFAULT_CONTENT_TYPE
The default content type- See Also:
 - Constant Field Values
 
 
- 
DEFAULT_CHARACTER_ENCODING
static final java.lang.String DEFAULT_CHARACTER_ENCODING
The default character encoding- See Also:
 - Constant Field Values
 
 
- 
SELECTOR_FEED
static final java.lang.String SELECTOR_FEED
The request selector for feeds- See Also:
 - Constant Field Values
 
 
- 
SELECTOR_FEEDENTRY
static final java.lang.String SELECTOR_FEEDENTRY
The request selector for feed entries- See Also:
 - Constant Field Values
 
 
- 
SELECTOR_ATOM
static final java.lang.String SELECTOR_ATOM
The request selector for Atom-formatted feeds (default)- See Also:
 - Constant Field Values
 
 
- 
SELECTOR_RSS
static final java.lang.String SELECTOR_RSS
The request selector for RSS-formatted feeds- See Also:
 - Constant Field Values
 
 
- 
SUFFIX_HTML
static final java.lang.String SUFFIX_HTML
The suffix for HTML links- See Also:
 - Constant Field Values
 
 
- 
SUFFIX_XML
static final java.lang.String SUFFIX_XML
The suffix for XML links- See Also:
 - Constant Field Values
 
 
- 
SUFFIX_FEED
static final java.lang.String SUFFIX_FEED
The suffix for feed links- See Also:
 - Constant Field Values
 
 
- 
SUFFIX_FEEDENTRY
static final java.lang.String SUFFIX_FEEDENTRY
The suffix for feed entry links- See Also:
 - Constant Field Values
 
 
- 
SUFFIX_COMMENTS
static final java.lang.String SUFFIX_COMMENTS
The suffix for comment links- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
getContentType
java.lang.String getContentType()
Returns the content type of the feed.- Returns:
 - The type
 
 
- 
getCharacterEncoding
java.lang.String getCharacterEncoding()
Returns the character encoding of the feed.- Returns:
 - The encoding
 
 
- 
printHeader
void printHeader() throws java.io.IOExceptionWrites the feed header.- Throws:
 java.io.IOException- If output fails
 
- 
printEntry
void printEntry() throws java.io.IOExceptionPrints the current resource as a feed entry.- Throws:
 java.io.IOException- If output fails
 
- 
printEntry
void printEntry(Resource res) throws java.io.IOException
Prints the specified resource as a feed entry- Parameters:
 res- the resource- Throws:
 java.io.IOException- If output fails
 
- 
printChildEntries
void printChildEntries() throws java.io.IOExceptionPrints the children of the current resource as feed entries- Throws:
 java.io.IOException- If output fails
 
- 
printChildEntries
void printChildEntries(int max) throws java.io.IOExceptionPrints the children of the current resource as feed entries- Parameters:
 max- The maximum number of entries- Throws:
 java.io.IOException- If output fails
 
- 
printEntries
void printEntries(java.util.Iterator<Resource> iter) throws java.io.IOException
Prints the specified resources as feed entries- Parameters:
 iter- The resources- Throws:
 java.io.IOException- If output fails
 
- 
printEntries
void printEntries(java.util.Iterator<Resource> iter, int max) throws java.io.IOException
Prints the specified resources as feed entries- Parameters:
 iter- The resourcesmax- The maximum number of entries- Throws:
 java.io.IOException- If output fails
 
- 
printFooter
void printFooter() throws java.io.IOExceptionWrites the feed footer.- Throws:
 java.io.IOException- If output fails
 
 - 
 
 -