public interface RSSGenerator extends Initializable
This class can produce quite a few different styles of feeds. The following modes are available:
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATOM
Parameter value to represent Atom feeds.
|
static java.lang.String |
MODE_BLOG
Parameter value to represent a 'blog' style feed.
|
static java.lang.String |
MODE_FULL
Parameter value to represent a 'full' style feed.
|
static java.lang.String |
MODE_WIKI
Parameter value to represent a 'wiki' style feed.
|
static java.lang.String |
PROP_CHANNEL_DESCRIPTION
Defines the property name for the RSS channel description.
|
static java.lang.String |
PROP_CHANNEL_LANGUAGE
Defines the property name for the RSS channel language.
|
static java.lang.String |
PROP_CHANNEL_TITLE
Defines the property name for the RSS channel title.
|
static java.lang.String |
PROP_GENERATE_RSS
Defines the property name for the RSS generator main switch.
|
static java.lang.String |
PROP_INTERVAL
Defines the property name for the RSS generation interval in seconds.
|
static java.lang.String |
PROP_RSS_AUTHOR
Defines the property name for the RSS author.
|
static java.lang.String |
PROP_RSS_AUTHOREMAIL
Defines the property name for the RSS author email.
|
static java.lang.String |
PROP_RSSFILE
Defines the property name for the RSS file that the wiki should generate.
|
static java.lang.String |
RSS10
Parameter value to represent RSS 1.0 feeds.
|
static java.lang.String |
RSS20
Parameter value to represent RSS 2.0 feeds.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
format(java.lang.String s)
Does the required formatting and entity replacement for XML.
|
java.lang.String |
generate()
Generates the RSS resource.
|
java.lang.String |
generateBlogRSS(Context wikiContext,
java.util.List<Page> changed,
Feed feed)
Creates RSS from modifications as if this page was a blog (using the WeblogPlugin).
|
java.lang.String |
generateFeed(Context wikiContext,
java.util.List<Page> changed,
java.lang.String mode,
java.lang.String type)
Generates a feed based on a context and list of changes.
|
java.lang.String |
generateFullWikiRSS(Context wikiContext,
Feed feed)
Generates an RSS feed for the entire wiki.
|
java.lang.String |
generateWikiPageRSS(Context wikiContext,
java.util.List<Page> changed,
Feed feed)
Create RSS/Atom as if this page was a wikipage (in contrast to Blog mode).
|
static java.lang.String |
getContentType(java.lang.String mode)
Returns the content type of this RSS feed.
|
java.lang.String |
getRssFile()
returns the rss file.
|
boolean |
isEnabled()
Returns
true if RSS generation is enabled. |
void |
setEnabled(boolean enabled)
Turns RSS generation on or off.
|
initializestatic final java.lang.String RSS10
static final java.lang.String RSS20
static final java.lang.String ATOM
static final java.lang.String MODE_BLOG
static final java.lang.String MODE_WIKI
static final java.lang.String MODE_FULL
static final java.lang.String PROP_CHANNEL_DESCRIPTION
static final java.lang.String PROP_CHANNEL_LANGUAGE
static final java.lang.String PROP_CHANNEL_TITLE
static final java.lang.String PROP_GENERATE_RSS
static final java.lang.String PROP_RSSFILE
static final java.lang.String PROP_INTERVAL
static final java.lang.String PROP_RSS_AUTHOR
static final java.lang.String PROP_RSS_AUTHOREMAIL
java.lang.String generate()
java.lang.String generateFeed(Context wikiContext, java.util.List<Page> changed, java.lang.String mode, java.lang.String type) throws java.lang.IllegalArgumentException
wikiContext - The WikiContextchanged - A list of Entry objectsmode - The mode (wiki/blog)type - The type (RSS10, RSS20, ATOM). Default is RSS 1.0java.lang.IllegalArgumentException - If an illegal mode is given.boolean isEnabled()
true if RSS generation is enabled.void setEnabled(boolean enabled)
generate() or generateFeed(Context, List, String, String) methods output anything.enabled - whether RSS generation is considered enabled.java.lang.String getRssFile()
java.lang.String generateFullWikiRSS(Context wikiContext, Feed feed)
wikiContext - A WikiContextfeed - A Feed to generate the feed to.java.lang.String generateWikiPageRSS(Context wikiContext, java.util.List<Page> changed, Feed feed)
wikiContext - The WikiContextchanged - A List of changed WikiPages.feed - A Feed object to fill.java.lang.String generateBlogRSS(Context wikiContext, java.util.List<Page> changed, Feed feed)
wikiContext - The WikiContext, as usual.changed - A list of the changed pages.feed - A valid Feed object. The feed will be used to create the RSS/Atom, depending on which kind of an object you want to put in it.static java.lang.String format(java.lang.String s)
s - String to format.static java.lang.String getContentType(java.lang.String mode)
Copyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.