com.ecyrd.jspwiki.plugin
Class IndexPlugin

java.lang.Object
  extended by com.ecyrd.jspwiki.plugin.IndexPlugin
All Implemented Interfaces:
WikiPlugin

public class IndexPlugin
extends Object
implements WikiPlugin

Builds an index of all pages.

Parameters

Since:
1.9.9
Author:
Alain Ravet, Janne Jalkanen

Field Summary
static String INITIALS_COLOR
           
protected static org.apache.log4j.Logger log
           
protected  StringWriter m_bodyPart
           
protected  StringWriter m_headerPart
           
protected  String m_previousPageFirstLetter
           
 
Constructor Summary
IndexPlugin()
           
 
Method Summary
protected  void addPageToIndex(WikiContext context, WikiPage i_curPage, TranslatorReader i_linkProcessor)
           
protected  void breakLineIfTooLong()
           
 String execute(WikiContext i_context, Map i_params)
          This is the main entry point for any plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log

INITIALS_COLOR

public static final String INITIALS_COLOR
See Also:
Constant Field Values

m_previousPageFirstLetter

protected String m_previousPageFirstLetter

m_bodyPart

protected StringWriter m_bodyPart

m_headerPart

protected StringWriter m_headerPart
Constructor Detail

IndexPlugin

public IndexPlugin()
Method Detail

execute

public String execute(WikiContext i_context,
                      Map i_params)
               throws PluginException
Description copied from interface: WikiPlugin
This is the main entry point for any plugin. The parameters are parsed, and a special parameter called "_body" signifies the name of the plugin body, i.e. the part of the plugin that is not a parameter of the form "key=value". This has been separated using an empty line.

Note that it is preferred that the plugin returns XHTML-compliant HTML (i.e. close all tags, use <br /> instead of <br>, etc.

Specified by:
execute in interface WikiPlugin
Parameters:
i_context - The current WikiContext.
i_params - A Map which contains key-value pairs. Any parameter that the user has specified on the wiki page will contain String-String parameters, but it is possible that at some future date, JSPWiki will give you other things that are not Strings.
Returns:
HTML, ready to be included into the rendered page.
Throws:
PluginException - In case anything goes wrong.

addPageToIndex

protected void addPageToIndex(WikiContext context,
                              WikiPage i_curPage,
                              TranslatorReader i_linkProcessor)

breakLineIfTooLong

protected void breakLineIfTooLong()