Package com.day.cq.commons.feed
Interface Feed
-
- All Known Implementing Classes:
AbstractFeed
,AtomFeed
,RssFeed
public interface Feed
TheFeed
interface is used to print a resource as a feed.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_CHARACTER_ENCODING
The default character encodingstatic String
DEFAULT_CONTENT_TYPE
The default content typestatic String
SELECTOR_ATOM
The request selector for Atom-formatted feeds (default)static String
SELECTOR_FEED
The request selector for feedsstatic String
SELECTOR_FEEDENTRY
The request selector for feed entriesstatic String
SELECTOR_RSS
The request selector for RSS-formatted feedsstatic String
SUFFIX_COMMENTS
The suffix for comment linksstatic String
SUFFIX_FEED
The suffix for feed linksstatic String
SUFFIX_FEEDENTRY
The suffix for feed entry linksstatic String
SUFFIX_HTML
The suffix for HTML linksstatic String
SUFFIX_XML
The suffix for XML links
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getCharacterEncoding()
Returns the character encoding of the feed.String
getContentType()
Returns the content type of the feed.void
printChildEntries()
Prints the children of the current resource as feed entriesvoid
printChildEntries(int max)
Prints the children of the current resource as feed entriesvoid
printEntries(Iterator<Resource> iter)
Prints the specified resources as feed entriesvoid
printEntries(Iterator<Resource> iter, int max)
Prints the specified resources as feed entriesvoid
printEntry()
Prints the current resource as a feed entry.void
printEntry(Resource res)
Prints the specified resource as a feed entryvoid
printFooter()
Writes the feed footer.void
printHeader()
Writes the feed header.
-
-
-
Field Detail
-
DEFAULT_CONTENT_TYPE
static final String DEFAULT_CONTENT_TYPE
The default content type- See Also:
- Constant Field Values
-
DEFAULT_CHARACTER_ENCODING
static final String DEFAULT_CHARACTER_ENCODING
The default character encoding- See Also:
- Constant Field Values
-
SELECTOR_FEED
static final String SELECTOR_FEED
The request selector for feeds- See Also:
- Constant Field Values
-
SELECTOR_FEEDENTRY
static final String SELECTOR_FEEDENTRY
The request selector for feed entries- See Also:
- Constant Field Values
-
SELECTOR_ATOM
static final String SELECTOR_ATOM
The request selector for Atom-formatted feeds (default)- See Also:
- Constant Field Values
-
SELECTOR_RSS
static final String SELECTOR_RSS
The request selector for RSS-formatted feeds- See Also:
- Constant Field Values
-
SUFFIX_HTML
static final String SUFFIX_HTML
The suffix for HTML links- See Also:
- Constant Field Values
-
SUFFIX_XML
static final String SUFFIX_XML
The suffix for XML links- See Also:
- Constant Field Values
-
SUFFIX_FEED
static final String SUFFIX_FEED
The suffix for feed links- See Also:
- Constant Field Values
-
SUFFIX_FEEDENTRY
static final String SUFFIX_FEEDENTRY
The suffix for feed entry links- See Also:
- Constant Field Values
-
SUFFIX_COMMENTS
static final String SUFFIX_COMMENTS
The suffix for comment links- See Also:
- Constant Field Values
-
-
Method Detail
-
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
void printHeader() throws IOException
Writes the feed header.- Throws:
IOException
- If output fails
-
printEntry
void printEntry() throws IOException
Prints the current resource as a feed entry.- Throws:
IOException
- If output fails
-
printEntry
void printEntry(Resource res) throws IOException
Prints the specified resource as a feed entry- Parameters:
res
- the resource- Throws:
IOException
- If output fails
-
printChildEntries
void printChildEntries() throws IOException
Prints the children of the current resource as feed entries- Throws:
IOException
- If output fails
-
printChildEntries
void printChildEntries(int max) throws IOException
Prints the children of the current resource as feed entries- Parameters:
max
- The maximum number of entries- Throws:
IOException
- If output fails
-
printEntries
void printEntries(Iterator<Resource> iter) throws IOException
Prints the specified resources as feed entries- Parameters:
iter
- The resources- Throws:
IOException
- If output fails
-
printEntries
void printEntries(Iterator<Resource> iter, int max) throws IOException
Prints the specified resources as feed entries- Parameters:
iter
- The resourcesmax
- The maximum number of entries- Throws:
IOException
- If output fails
-
printFooter
void printFooter() throws IOException
Writes the feed footer.- Throws:
IOException
- If output fails
-
-