com.ecyrd.jspwiki.rss
Class RSSGenerator

java.lang.Object
  |
  +--com.ecyrd.jspwiki.rss.RSSGenerator

public class RSSGenerator
extends java.lang.Object

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.

Since:
1.7.5.
Author:
Janne Jalkanen

Field Summary
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_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_RSSFILE
          Defines the property name for the RSS file that the wiki should generate.
 
Constructor Summary
RSSGenerator(WikiEngine engine, java.util.Properties properties)
          Initialize the RSS generator.
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_CHANNEL_DESCRIPTION

public static final java.lang.String PROP_CHANNEL_DESCRIPTION
Defines the property name for the RSS channel description. Default value for the channel description is an empty string.

Since:
1.7.6.
See Also:
Constant Field Values

PROP_CHANNEL_LANGUAGE

public static final java.lang.String PROP_CHANNEL_LANGUAGE
Defines the property name for the RSS channel language. Default value for the language is "en-us".

Since:
1.7.6.
See Also:
Constant Field Values

PROP_GENERATE_RSS

public static final java.lang.String PROP_GENERATE_RSS
Defines the property name for the RSS generator main switch.

Since:
1.7.6.
See Also:
Constant Field Values

PROP_RSSFILE

public static final java.lang.String PROP_RSSFILE
Defines the property name for the RSS file that the wiki should generate.

Since:
1.7.6.
See Also:
Constant Field Values

PROP_INTERVAL

public static final java.lang.String PROP_INTERVAL
Defines the property name for the RSS generation interval in seconds.

Since:
1.7.6.
See Also:
Constant Field Values
Constructor Detail

RSSGenerator

public RSSGenerator(WikiEngine engine,
                    java.util.Properties properties)
             throws NoRequiredPropertyException
Initialize the RSS generator.

Method Detail

format

public static java.lang.String format(java.lang.String s)
Does the required formatting and entity replacement for XML.


generate

public java.lang.String generate()
Generates the RSS resource. You probably want to output this result into a file or something, or serve as output from a servlet.