com.xpn.xwiki.render.macro.rss
Class RSSMacro
java.lang.Object
org.radeox.macro.BaseMacro
org.radeox.macro.BaseLocaleMacro
com.xpn.xwiki.render.macro.rss.RSSMacro
- All Implemented Interfaces:
- Comparable, org.radeox.macro.LocaleMacro, org.radeox.macro.Macro
public class RSSMacro
- extends org.radeox.macro.BaseLocaleMacro
A Radeox MacroFilter for rendering an RSS feed.
- Version:
- 0.2d
- Author:
- Joe Germuska
Fields inherited from class org.radeox.macro.BaseMacro |
description, initialContext, paramDescription |
Methods inherited from class org.radeox.macro.BaseLocaleMacro |
setInitialContext |
Methods inherited from class org.radeox.macro.BaseMacro |
compareTo, toString |
RSSMacro
public RSSMacro()
getLocaleKey
public String getLocaleKey()
getName
public String getName()
- Specified by:
getName
in interface org.radeox.macro.Macro
- Overrides:
getName
in class org.radeox.macro.BaseLocaleMacro
execute
public void execute(Writer writer,
org.radeox.macro.parameter.MacroParameter parameter)
throws IllegalArgumentException,
IOException
- Process the macro.
- Specified by:
execute
in interface org.radeox.macro.Macro
- Specified by:
execute
in class org.radeox.macro.BaseMacro
- Parameters:
writer
- the output writerparameter
- the input parameters of the macro.
- Throws:
IllegalArgumentException
IOException
- from calls to writer.write()
TODO Make commons-digester understand more
different RSS feeds, or switch to a better RSS library.
getParamDescription
public String[] getParamDescription()
- Specified by:
getParamDescription
in interface org.radeox.macro.Macro
- Overrides:
getParamDescription
in class org.radeox.macro.BaseMacro
- Returns:
- the MacroFilter's parameter descriptions:
- feed: url of an RSS feed
- ?img: if 'true' and if feed has an image, image will be included
- ?align: if an image will be included, use this alignment
- ?css: if 'true', elements will be created with CSS styles; otherwise, static formatting methods will
be used
- ?count: an integer, the maximum number of feed items to display
- ?full: if 'true', descriptions for each item will be included. Otherwise, just titles.
- ?search: if 'true' and if feed has a search field, field will be included
Note that all parameters must be passed using names.
getDescription
public String getDescription()
- Specified by:
getDescription
in interface org.radeox.macro.Macro
- Overrides:
getDescription
in class org.radeox.macro.BaseMacro
- Returns:
- the MacroFilter's description: 'Use to aggregate RSS feeds'.
Copyright © 2004-2013 XWiki. All Rights Reserved.