info.bliki.wiki.template
Interface ITemplateFunction

All Known Implementing Classes:
AbstractTemplateFunction, Allmacros, Anchorencode, DollarContext, Expr, Formatnum, Fullurl, If, Ifeq, Iferror, Ifexist, Ifexpr, LC, LCFirst, Localurl, NS, Padleft, Padright, Plural, Safesubst, Subst, Switch, Tag, Time, UC, UCFirst, URLEncode

public interface ITemplateFunction

Interface for a template parser function (i.e. {{ #if: ... }} )


Method Summary
 java.lang.String getFunctionDoc()
          Return a short description of the implemented template function
 java.lang.String parseFunction(java.util.List<java.lang.String> parts, IWikiModel model, char[] src, int beginIndex, int endIndex)
          Parse a template function (like for example {{ #if: ... }}) The result is also a text string in Wikipedia syntax notation which will be parsed again (recursively) in the TemplateParser step.
 

Method Detail

parseFunction

java.lang.String parseFunction(java.util.List<java.lang.String> parts,
                               IWikiModel model,
                               char[] src,
                               int beginIndex,
                               int endIndex)
                               throws java.io.IOException
Parse a template function (like for example {{ #if: ... }}) The result is also a text string in Wikipedia syntax notation which will be parsed again (recursively) in the TemplateParser step.

Parameters:
parts - the parser function arguments (extracted from the wiki text by splitting the string at the pipe symbol ´|´)
model - the wiki model
src - the array of the current Wikipedia source text
beginIndex - the beginning index, inclusive.
endIndex - the ending index, exclusive.
Returns:
the result string of this template function or null if the parsing fails or isn't valid
Throws:
java.io.IOException
See Also:
TemplateParser#parseTemplate(StringBuffer)

getFunctionDoc

java.lang.String getFunctionDoc()
Return a short description of the implemented template function

Returns:


Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.