Package com.day.cq.commons.feed
Interface Feed
- All Known Implementing Classes:
AbstractFeed,AtomFeed,RssFeed
public interface Feed
The
Feed interface is used to print a resource as a feed.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default character encodingstatic final StringThe default content typestatic final StringThe request selector for Atom-formatted feeds (default)static final StringThe request selector for feedsstatic final StringThe request selector for feed entriesstatic final StringThe request selector for RSS-formatted feedsstatic final StringThe suffix for comment linksstatic final StringThe suffix for feed linksstatic final StringThe suffix for feed entry linksstatic final StringThe suffix for HTML linksstatic final StringThe suffix for XML links -
Method Summary
Modifier and TypeMethodDescriptionReturns the character encoding of the feed.Returns the content type of the feed.voidPrints the children of the current resource as feed entriesvoidprintChildEntries(int max) Prints the children of the current resource as feed entriesvoidprintEntries(Iterator<Resource> iter) Prints the specified resources as feed entriesvoidprintEntries(Iterator<Resource> iter, int max) Prints the specified resources as feed entriesvoidPrints the current resource as a feed entry.voidprintEntry(Resource res) Prints the specified resource as a feed entryvoidWrites the feed footer.voidWrites the feed header.
-
Field Details
-
DEFAULT_CONTENT_TYPE
The default content type- See Also:
-
DEFAULT_CHARACTER_ENCODING
The default character encoding- See Also:
-
SELECTOR_FEED
The request selector for feeds- See Also:
-
SELECTOR_FEEDENTRY
The request selector for feed entries- See Also:
-
SELECTOR_ATOM
The request selector for Atom-formatted feeds (default)- See Also:
-
SELECTOR_RSS
The request selector for RSS-formatted feeds- See Also:
-
SUFFIX_HTML
The suffix for HTML links- See Also:
-
SUFFIX_XML
The suffix for XML links- See Also:
-
SUFFIX_FEED
The suffix for feed links- See Also:
-
SUFFIX_FEEDENTRY
The suffix for feed entry links- See Also:
-
SUFFIX_COMMENTS
The suffix for comment links- See Also:
-
-
Method Details
-
getContentType
String getContentType()Returns the content type of the feed.- Returns:
- The type
-
getCharacterEncoding
String getCharacterEncoding()Returns the character encoding of the feed.- Returns:
- The encoding
-
printHeader
Writes the feed header.- Throws:
IOException- If output fails
-
printEntry
Prints the current resource as a feed entry.- Throws:
IOException- If output fails
-
printEntry
Prints the specified resource as a feed entry- Parameters:
res- the resource- Throws:
IOException- If output fails
-
printChildEntries
Prints the children of the current resource as feed entries- Throws:
IOException- If output fails
-
printChildEntries
Prints the children of the current resource as feed entries- Parameters:
max- The maximum number of entries- Throws:
IOException- If output fails
-
printEntries
Prints the specified resources as feed entries- Parameters:
iter- The resources- Throws:
IOException- If output fails
-
printEntries
Prints the specified resources as feed entries- Parameters:
iter- The resourcesmax- The maximum number of entries- Throws:
IOException- If output fails
-