info.bliki.wiki.model
Interface IConfiguration

All Known Subinterfaces:
IWikiModel
All Known Implementing Classes:
AbstractWikiModel, BBCodeModel, Configuration, PDFWikiModel, WikiModel

public interface IConfiguration

Configuration interface for extensions similar to the Mediawiki HTML styled tag extension, template parser functions and interwiki links

See Also:
Configuration

Method Summary
 SourceCodeFormatter addCodeFormatter(java.lang.String key, SourceCodeFormatter value)
          Add a new source code formatter to the configuration
 java.lang.String addInterwikiLink(java.lang.String key, java.lang.String value)
          Add another Interwiki link to the configuration.
 ITemplateFunction addTemplateFunction(java.lang.String key, ITemplateFunction value)
          Add a new interwiki link to the configuration
 TagToken addTokenTag(java.lang.String key, TagToken value)
          Add a new HTML styled tag to the configuration
 java.util.Map<java.lang.String,SourceCodeFormatter> getCodeFormatterMap()
          Get the source code formatter map of built-in source code formatters
 java.util.Map<java.lang.String,java.lang.String> getInterwikiMap()
          Get the interwiki links map for converting interwiki links into external URLs.
 java.util.Map<java.lang.String,java.lang.String> getTemplateCallsCache()
          Get the currently configured cache implementation for template calls.
 java.util.Map<java.lang.String,ITemplateFunction> getTemplateMap()
          Get the template parser functions map of built-in template functions
 java.util.Map<java.lang.String,TagToken> getTokenMap()
          Get the HTML styled tag map for built-in tags
 java.util.Set<java.lang.String> getUriSchemeSet()
          Get the set of all allowed URI scheme shortcuts like http, https, ftp,...
 void setTemplateCallsCache(java.util.Map<java.lang.String,java.lang.String> map)
          Set a cache map implementation.
 

Method Detail

addCodeFormatter

SourceCodeFormatter addCodeFormatter(java.lang.String key,
                                     SourceCodeFormatter value)
Add a new source code formatter to the configuration

Parameters:
key -
value -
Returns:

addInterwikiLink

java.lang.String addInterwikiLink(java.lang.String key,
                                  java.lang.String value)
Add another Interwiki link to the configuration. The value string must contain the ${title} placeholder for the used wiki article link.

Parameters:
key - the prefix used in the interwiki link (i.e. [[prefix:...]] )
value - the external link which should be generated from the interwiki link
Returns:

addTemplateFunction

ITemplateFunction addTemplateFunction(java.lang.String key,
                                      ITemplateFunction value)
Add a new interwiki link to the configuration

Parameters:
key -
value -
Returns:

addTokenTag

TagToken addTokenTag(java.lang.String key,
                     TagToken value)
Add a new HTML styled tag to the configuration

Parameters:
key -
value -
Returns:

getCodeFormatterMap

java.util.Map<java.lang.String,SourceCodeFormatter> getCodeFormatterMap()
Get the source code formatter map of built-in source code formatters

Returns:

getInterwikiMap

java.util.Map<java.lang.String,java.lang.String> getInterwikiMap()
Get the interwiki links map for converting interwiki links into external URLs. Example: maps the interwiki shortcut "de" to "http://de.wikipedia.org/wiki/${title}"

Returns:

getTemplateCallsCache

java.util.Map<java.lang.String,java.lang.String> getTemplateCallsCache()
Get the currently configured cache implementation for template calls.

Returns:
null if no cache implementation is set.
See Also:
setTemplateCallsCache(Map)

getTemplateMap

java.util.Map<java.lang.String,ITemplateFunction> getTemplateMap()
Get the template parser functions map of built-in template functions

Returns:

getTokenMap

java.util.Map<java.lang.String,TagToken> getTokenMap()
Get the HTML styled tag map for built-in tags

Returns:

getUriSchemeSet

java.util.Set<java.lang.String> getUriSchemeSet()
Get the set of all allowed URI scheme shortcuts like http, https, ftp,... See URI scheme


setTemplateCallsCache

void setTemplateCallsCache(java.util.Map<java.lang.String,java.lang.String> map)
Set a cache map implementation. For example based on JSR 107. Template calls which use the same parameters over and over again do lookup this cache and use the preparsed result if available. Note: don't use a simple java.util.HashMap implementation because it's not thread-safe an grows infinitly.

Parameters:
map - the cache implementation


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