com.xpn.xwiki.render.filter
Class XWikiLinkFilter
java.lang.Object
org.radeox.filter.FilterSupport
org.radeox.filter.regex.RegexFilter
org.radeox.filter.regex.RegexTokenFilter
org.radeox.filter.regex.LocaleRegexTokenFilter
com.xpn.xwiki.render.filter.XWikiLinkFilter
- All Implemented Interfaces:
- org.radeox.filter.Filter
public class XWikiLinkFilter
- extends org.radeox.filter.regex.LocaleRegexTokenFilter
XWikiLinkFilter finds [text] in its input and transforms this to ... if the wiki page exists. If
not it adds a [create text] to the output.
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 |
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 |
XWikiLinkFilter
public XWikiLinkFilter()
getLocaleKey
protected 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 org.radeox.filter.regex.LocaleRegexTokenFilter
setUp
protected void setUp(org.radeox.filter.context.FilterContext context)
- Overrides:
setUp
in class org.radeox.filter.regex.RegexTokenFilter
handleMatch
public void handleMatch(StringBuffer buffer,
org.radeox.regex.MatchResult result,
org.radeox.filter.context.FilterContext context)
- Specified by:
handleMatch
in class org.radeox.filter.regex.RegexTokenFilter
getWikiView
protected String getWikiView(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
convertWikiWords
public static String convertWikiWords(String name)
Copyright © 2004–2014 XWiki. All rights reserved.