Class LinkTestFilter

    • Constructor Detail

      • LinkTestFilter

        public LinkTestFilter()
    • Method Detail

      • 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 LocaleRegexTokenFilter
      • handleMatch

        public void handleMatch​(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 String getWikiView​(String name,
                                     String hash)
        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