com.ecyrd.jspwiki.plugin
Class AbstractReferralPlugin

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

public abstract class AbstractReferralPlugin
extends Object
implements WikiPlugin

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

Parameters:
maxwidth: maximum width of generated links
separator: separator between generated links (wikitext)
after: output after the link before: output before the link

Author:
Janne Jalkanen

Field Summary
static int ALL_ITEMS
           
protected  String m_after
           
protected  String m_before
           
protected  WikiEngine m_engine
           
protected  org.apache.oro.text.regex.Pattern[] m_exclude
           
protected  org.apache.oro.text.regex.Pattern[] m_include
           
protected  int m_maxwidth
           
protected  String m_separator
           
static String PARAM_AFTER
           
static String PARAM_BEFORE
           
static String PARAM_EXCLUDE
           
static String PARAM_INCLUDE
           
static String PARAM_MAXWIDTH
           
static String PARAM_SEPARATOR
           
 
Constructor Summary
AbstractReferralPlugin()
           
 
Method Summary
protected  Collection filterCollection(Collection c)
           
 void initialize(WikiContext context, Map params)
          Used to initialize some things.
protected  String makeHTML(WikiContext context, String wikitext)
          Makes HTML with common parameters.
protected  String wikitizeCollection(Collection links, 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 String PARAM_MAXWIDTH
See Also:
Constant Field Values

PARAM_SEPARATOR

public static final String PARAM_SEPARATOR
See Also:
Constant Field Values

PARAM_AFTER

public static final String PARAM_AFTER
See Also:
Constant Field Values

PARAM_BEFORE

public static final String PARAM_BEFORE
See Also:
Constant Field Values

PARAM_EXCLUDE

public static final String PARAM_EXCLUDE
See Also:
Constant Field Values

PARAM_INCLUDE

public static final String PARAM_INCLUDE
See Also:
Constant Field Values

m_maxwidth

protected int m_maxwidth

m_before

protected String m_before

m_separator

protected String m_separator

m_after

protected String m_after

m_exclude

protected org.apache.oro.text.regex.Pattern[] m_exclude

m_include

protected org.apache.oro.text.regex.Pattern[] m_include

m_engine

protected WikiEngine m_engine
Constructor Detail

AbstractReferralPlugin

public AbstractReferralPlugin()
Method Detail

initialize

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

Throws:
PluginException
Since:
1.6.4

filterCollection

protected Collection filterCollection(Collection c)

wikitizeCollection

protected String wikitizeCollection(Collection links,
                                    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 String makeHTML(WikiContext context,
                          String wikitext)
Makes HTML with common parameters.

Since:
1.6.4