com.xpn.xwiki.render.macro.rss
Class RSSMacro

java.lang.Object
  extended by org.radeox.macro.BaseMacro
      extended by org.radeox.macro.BaseLocaleMacro
          extended by 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

Field Summary
 
Fields inherited from class org.radeox.macro.BaseMacro
description, initialContext, paramDescription
 
Constructor Summary
RSSMacro()
           
 
Method Summary
 void execute(Writer writer, org.radeox.macro.parameter.MacroParameter parameter)
          Process the macro.
 String getDescription()
           
 String getLocaleKey()
           
 String getName()
           
 String[] getParamDescription()
           
 
Methods inherited from class org.radeox.macro.BaseLocaleMacro
setInitialContext
 
Methods inherited from class org.radeox.macro.BaseMacro
compareTo, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RSSMacro

public RSSMacro()
Method Detail

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 writer
parameter - 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–2014 XWiki. All rights reserved.