com.ecyrd.jspwiki.plugin
Class AbstractReferralPlugin

java.lang.Object
  |
  +--com.ecyrd.jspwiki.plugin.AbstractReferralPlugin
All Implemented Interfaces:
WikiPlugin
Direct Known Subclasses:
ReferringPagesPlugin, UndefinedPagesPlugin, UnusedPagesPlugin

public abstract class AbstractReferralPlugin
extends java.lang.Object
implements WikiPlugin

This is a base class for all plugins using referral things.

Author:
Janne Jalkanen

Field Summary
static int ALL_ITEMS
           
protected  int m_maxwidth
           
protected  java.lang.String m_separator
           
static java.lang.String PARAM_MAXWIDTH
           
static java.lang.String PARAM_SEPARATOR
           
 
Constructor Summary
AbstractReferralPlugin()
           
 
Method Summary
 void initialize(WikiContext context, java.util.Map params)
          Used to initialize some things.
protected  java.lang.String makeHTML(WikiContext context, java.lang.String wikitext)
          Makes HTML with common parameters.
protected  java.lang.String wikitizeCollection(java.util.Collection links, java.lang.String separator, int numItems)
          Makes WikiText from a Collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ecyrd.jspwiki.plugin.WikiPlugin
execute
 

Field Detail

ALL_ITEMS

public static final int ALL_ITEMS
See Also:
Constant Field Values

PARAM_MAXWIDTH

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

PARAM_SEPARATOR

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

m_maxwidth

protected int m_maxwidth

m_separator

protected java.lang.String m_separator
Constructor Detail

AbstractReferralPlugin

public AbstractReferralPlugin()
Method Detail

initialize

public void initialize(WikiContext context,
                       java.util.Map params)
                throws PluginException
Used to initialize some things. All plugins must call this first.

PluginException
Since:
1.6.4

wikitizeCollection

protected java.lang.String wikitizeCollection(java.util.Collection links,
                                              java.lang.String separator,
                                              int numItems)
Makes WikiText from a Collection.

Parameters:
links - Collection to make into WikiText.
separator - Separator string to use.
numItems - How many items to show.

makeHTML

protected java.lang.String makeHTML(WikiContext context,
                                    java.lang.String wikitext)
Makes HTML with common parameters.

Since:
1.6.4