com.ecyrd.jspwiki.plugin
Class IndexPlugin

java.lang.Object
  |
  +--com.ecyrd.jspwiki.plugin.IndexPlugin
All Implemented Interfaces:
WikiPlugin

public class IndexPlugin
extends java.lang.Object
implements WikiPlugin

Builds an index of all pages.

Parameters

Since:
1.9.9
Author:
Alain Ravet, Janne Jalkanen

Field Summary
static java.lang.String INITIALS_COLOR
           
protected static org.apache.log4j.Category log
           
protected  java.io.StringWriter m_bodyPart
           
protected  java.io.StringWriter m_headerPart
           
protected  java.lang.String m_previousPageFirstLetter
           
 
Constructor Summary
IndexPlugin()
           
 
Method Summary
protected  void addPageToIndex(WikiPage i_curPage, TranslatorReader i_linkProcessor)
           
protected  void breakLineIfTooLong()
           
 java.lang.String execute(WikiContext i_context, java.util.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.Category log

INITIALS_COLOR

public static final java.lang.String INITIALS_COLOR
See Also:
Constant Field Values

m_previousPageFirstLetter

protected java.lang.String m_previousPageFirstLetter

m_bodyPart

protected java.io.StringWriter m_bodyPart

m_headerPart

protected java.io.StringWriter m_headerPart
Constructor Detail

IndexPlugin

public IndexPlugin()
Method Detail

execute

public java.lang.String execute(WikiContext i_context,
                                java.util.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(WikiPage i_curPage,
                              TranslatorReader i_linkProcessor)

breakLineIfTooLong

protected void breakLineIfTooLong()