| java.lang.Object com.ecyrd.jspwiki.rss.RSSGenerator
RSSGenerator | public class RSSGenerator (Code) | | 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.
author: Janne Jalkanen since: 1.7.5. |
Method Summary | |
public static String | format(String s) Does the required formatting and entity replacement for XML. | public String | generate() Generates the RSS resource. | protected String | generateBlogRSS(WikiContext wikiContext, List changed, Feed feed) Creates RSS from modifications as if this page was a blog (using the WeblogPlugin).
Parameters: wikiContext - The WikiContext, as usual. Parameters: changed - A list of the changed pages. Parameters: feed - A valid Feed object. | public String | generateFeed(WikiContext wikiContext, List changed, String mode, String type) Generates a feed based on a context and list of changes.
Parameters: wikiContext - The WikiContext Parameters: changed - A list of Entry objects Parameters: mode - The mode (wiki/blog) Parameters: type - The type (RSS10, RSS20, ATOM). | protected String | generateFullWikiRSS(WikiContext wikiContext, Feed feed) Generates an RSS feed for the entire wiki. | protected String | generateWikiPageRSS(WikiContext wikiContext, List changed, Feed feed) Create RSS/Atom as if this page was a wikipage (in contrast to Blog mode). | public static String | getContentType(String mode) Returns the content type of this RSS feed.
since: 2.3.15 Parameters: mode - the RSS mode: RSSGenerator.RSS10, RSSGenerator.RSS20 or RSSGenerator.ATOM. | public boolean | isEnabled() Returns true if RSS generation is enabled. | public synchronized void | setEnabled(boolean enabled) Turns RSS generation on or off. |
PROP_CHANNEL_DESCRIPTION | final public static String PROP_CHANNEL_DESCRIPTION(Code) | | Defines the property name for the RSS channel description. Default value for the
channel description is an empty string.
since: 1.7.6. |
PROP_CHANNEL_LANGUAGE | final public static String PROP_CHANNEL_LANGUAGE(Code) | | Defines the property name for the RSS channel language. Default value for the
language is "en-us".
since: 1.7.6. |
PROP_CHANNEL_TITLE | final public static String PROP_CHANNEL_TITLE(Code) | | |
PROP_GENERATE_RSS | final public static String PROP_GENERATE_RSS(Code) | | Defines the property name for the RSS generator main switch.
since: 1.7.6. |
PROP_INTERVAL | final public static String PROP_INTERVAL(Code) | | Defines the property name for the RSS generation interval in seconds.
since: 1.7.6. |
PROP_RSSAUTHOR | final public static String PROP_RSSAUTHOR(Code) | | |
PROP_RSSAUTHOREMAIL | final public static String PROP_RSSAUTHOREMAIL(Code) | | |
PROP_RSSFILE | final public static String PROP_RSSFILE(Code) | | Defines the property name for the RSS file that the wiki should generate.
since: 1.7.6. |
PROP_RSS_AUTHOR | final public static String PROP_RSS_AUTHOR(Code) | | |
PROP_RSS_AUTHOREMAIL | final public static String PROP_RSS_AUTHOREMAIL(Code) | | |
PROP_RSS_COPYRIGHT | final public static String PROP_RSS_COPYRIGHT(Code) | | |
format | public static String format(String s)(Code) | | Does the required formatting and entity replacement for XML.
|
generate | public String generate()(Code) | | Generates the RSS resource. You probably want to output this
result into a file or something, or serve as output from a servlet.
|
generateBlogRSS | protected String generateBlogRSS(WikiContext wikiContext, List changed, Feed feed) throws ProviderException(Code) | | Creates RSS from modifications as if this page was a blog (using the WeblogPlugin).
Parameters: wikiContext - The WikiContext, as usual. Parameters: changed - A list of the changed pages. Parameters: feed - A valid Feed object. The feed will be used to create the RSS/Atom, dependingon which kind of an object you want to put in it. A String of valid RSS or Atom. throws: ProviderException - If reading of pages was not possible. |
generateFeed | public String generateFeed(WikiContext wikiContext, List changed, String mode, String type) throws ProviderException(Code) | | Generates a feed based on a context and list of changes.
Parameters: wikiContext - The WikiContext Parameters: changed - A list of Entry objects Parameters: mode - The mode (wiki/blog) Parameters: type - The type (RSS10, RSS20, ATOM). Default is RSS 1.0 Fully formed XML. throws: ProviderException - If the underlying provider failed. throws: IllegalArgumentException - If an illegal mode is given. |
generateFullWikiRSS | protected String generateFullWikiRSS(WikiContext wikiContext, Feed feed)(Code) | | Generates an RSS feed for the entire wiki. Each item should be an instance of the RSSItem class.
|
generateWikiPageRSS | protected String generateWikiPageRSS(WikiContext wikiContext, List changed, Feed feed)(Code) | | Create RSS/Atom as if this page was a wikipage (in contrast to Blog mode).
Parameters: wikiContext - Parameters: changed - Parameters: feed - |
isEnabled | public boolean isEnabled()(Code) | | Returns true if RSS generation is enabled.
whether RSS generation is currently enabled |
|
|