|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecyrd.jspwiki.rss.RSSGenerator
public class RSSGenerator
Generates an RSS feed from the recent changes.
We use the 1.0 spec, including the wiki-specific extensions. Wiki extensions have been defined in UseMod:ModWiki.
Field Summary | |
---|---|
static String |
ATOM
|
static String |
MODE_BLOG
|
static String |
MODE_FULL
|
static String |
MODE_WIKI
|
static String |
PROP_CHANNEL_DESCRIPTION
Defines the property name for the RSS channel description. |
static String |
PROP_CHANNEL_LANGUAGE
Defines the property name for the RSS channel language. |
static String |
PROP_CHANNEL_TITLE
|
static String |
PROP_GENERATE_RSS
Defines the property name for the RSS generator main switch. |
static String |
PROP_INTERVAL
Defines the property name for the RSS generation interval in seconds. |
static String |
PROP_RSS_AUTHOR
|
static String |
PROP_RSS_AUTHOREMAIL
|
static String |
PROP_RSS_COPYRIGHT
|
static String |
PROP_RSSAUTHOR
|
static String |
PROP_RSSAUTHOREMAIL
|
static String |
PROP_RSSFILE
Defines the property name for the RSS file that the wiki should generate. |
static String |
RSS10
|
static String |
RSS20
|
Constructor Summary | |
---|---|
RSSGenerator(WikiEngine engine,
Properties properties)
Initialize the RSS generator. |
Method Summary | |
---|---|
static String |
format(String s)
Does the required formatting and entity replacement for XML. |
String |
generate()
Generates the RSS resource. |
protected String |
generateBlogRSS(WikiContext wikiContext,
List changed,
Feed feed)
|
String |
generateFeed(WikiContext wikiContext,
List changed,
String mode,
String type)
Generates a feed based on a context and list of changes. |
protected String |
generateFullWikiRSS(WikiContext wikiContext,
Feed feed)
Generates an RSS feed for the entire wiki. |
protected String |
generateWikiPageRSS(WikiContext wikiContext,
List changed,
Feed feed)
|
static String |
getContentType(String mode)
Returns the content type of this RSS feed. |
boolean |
isEnabled()
Returns true if RSS generation is enabled. |
void |
setEnabled(boolean enabled)
Turns RSS generation on or off. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String RSS10
public static final String RSS20
public static final String ATOM
public static final String MODE_BLOG
public static final String MODE_WIKI
public static final String MODE_FULL
public static final String PROP_CHANNEL_DESCRIPTION
public static final String PROP_CHANNEL_LANGUAGE
public static final String PROP_CHANNEL_TITLE
public static final String PROP_GENERATE_RSS
public static final String PROP_RSSFILE
public static final String PROP_RSSAUTHOR
public static final String PROP_RSSAUTHOREMAIL
public static final String PROP_INTERVAL
public static final String PROP_RSS_AUTHOR
public static final String PROP_RSS_AUTHOREMAIL
public static final String PROP_RSS_COPYRIGHT
Constructor Detail |
---|
public RSSGenerator(WikiEngine engine, Properties properties) throws NoRequiredPropertyException
NoRequiredPropertyException
Method Detail |
---|
public static String format(String s)
public String generate()
public static String getContentType(String mode)
mode
- the RSS mode: RSS10
, RSS20
or ATOM
.
public String generateFeed(WikiContext wikiContext, List changed, String mode, String type) throws ProviderException
wikiContext
- The WikiContextchanged
- A list of Entry objectsmode
- The mode (wiki/blog)type
- The type (RSS10, RSS20, ATOM). Default is RSS 1.0
ProviderException
- If the underlying provider failed.
IllegalArgumentException
- If an illegal mode is given.public boolean isEnabled()
true
if RSS generation is enabled.
public void setEnabled(boolean enabled)
generate()
or
generateFeed(WikiContext, List, String, String)
methods output anything.
enabled
- whether RSS generation is considered enabled.protected String generateFullWikiRSS(WikiContext wikiContext, Feed feed)
protected String generateWikiPageRSS(WikiContext wikiContext, List changed, Feed feed)
protected String generateBlogRSS(WikiContext wikiContext, List changed, Feed feed) throws ProviderException
ProviderException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |