org.radeox.filter
Class LinkTestFilter

java.lang.Object
  extended byorg.radeox.filter.FilterSupport
      extended byorg.radeox.filter.regex.RegexFilter
          extended byorg.radeox.filter.regex.RegexTokenFilter
              extended byorg.radeox.filter.regex.LocaleRegexTokenFilter
                  extended byorg.radeox.filter.LinkTestFilter
All Implemented Interfaces:
Filter
Direct Known Subclasses:
WikiLinkFilter

public class LinkTestFilter
extends LocaleRegexTokenFilter


Field Summary
 
Fields inherited from class org.radeox.filter.regex.LocaleRegexTokenFilter
inputMessages, outputMessages
 
Fields inherited from class org.radeox.filter.regex.RegexFilter
MULTILINE, pattern, SINGLELINE, substitute
 
Fields inherited from class org.radeox.filter.FilterSupport
initialContext
 
Constructor Summary
LinkTestFilter()
           
 
Method Summary
protected  java.lang.String getLocaleKey()
          The regular expression for detecting WikiLinks.
protected  java.lang.String getWikiView(java.lang.String name)
          Returns the view of the wiki name that is shown to the user.
 void handleMatch(java.lang.StringBuffer buffer, MatchResult result, FilterContext context)
          Method is called for every occurance of a regular expression.
protected  void setUp(FilterContext context)
           
 
Methods inherited from class org.radeox.filter.regex.LocaleRegexTokenFilter
getInputBundle, getOutputBundle, isSingleLine, setInitialContext
 
Methods inherited from class org.radeox.filter.regex.RegexTokenFilter
filter
 
Methods inherited from class org.radeox.filter.regex.RegexFilter
addRegex, addRegex, clearRegex
 
Methods inherited from class org.radeox.filter.FilterSupport
before, getDescription, replaces
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LinkTestFilter

public LinkTestFilter()
Method Detail

getLocaleKey

protected java.lang.String getLocaleKey()
The regular expression for detecting WikiLinks. Overwrite in subclass to support other link styles like OldAndUglyWikiLinking :-) /[A-Z][a-z]+([A-Z][a-z]+)+/ wikiPattern = "\\[(.*?)\\]";

Specified by:
getLocaleKey in class LocaleRegexTokenFilter

setUp

protected void setUp(FilterContext context)
Overrides:
setUp in class RegexTokenFilter

handleMatch

public void handleMatch(java.lang.StringBuffer buffer,
                        MatchResult result,
                        FilterContext context)
Description copied from class: RegexTokenFilter
Method is called for every occurance of a regular expression. Subclasses have to implement this mehtod.

Specified by:
handleMatch in class RegexTokenFilter
Parameters:
buffer - Buffer to write replacement string to
result - Hit with the found regualr expression
context - FilterContext for filters

getWikiView

protected java.lang.String getWikiView(java.lang.String name)
Returns the view of the wiki name that is shown to the user. Overwrite to support other views for example transform "WikiLinking" to "Wiki Linking". Does nothing by default.

Returns:
view The view of the wiki name


Copyright © 2003 Matthias L. Jugel, Stephan J. Schmidt. All Rights Reserved.