JSPWikiPlugin

A JSPWiki plugin is a software component installed as part of the wiki that can automate actions on wiki pages. Some of JSPWiki's features are implemented as plugins. These JSPWiki Core Plugins are available in all out-of-the-box installations. The well known PageIndex or RecentChanges pages contain little more than a plugin!

JSPWiki lets you create your own plugins. These are just simply Java classes that implement the org.apache.wiki.api.plugin.WikiPlugin interface and can be found somewhere in your classpath. The plugins work so that when you reference a plugin on a wiki page, the plugin is invoked and its output is inserted verbatim into the page.
Some are available at ContributedPlugins

Usage#

The long formal form to insert a plugin in a wiki page is:

[{INSERT <plugin class> WHERE <param1=value1>,<param2=value2>,...}]

If a parameter contains spaces, you can use single quotes (') around the parameter. INSERT and WHERE are optional and can be omitted:

[{<plugin class> <param1=value1>,<param2=value2>,...}]

such as:

[{CurrentTimePlugin format='yyyy.MM.dd G \'at\' hh:mm:ss z'}] 

whose output is:

2017.08.20 AD at 10:44:14 BST
Note the use of the backslash character '\' to escape the next character within the parameter values.

Sample Source#

Have a look at the plugins in JSPWiki's sources, an easy one is the CurrentTimePlugin


See: WikiPlugin (API), JSPWiki Core Plugins, Installing a plugin Contributed Plugins

See also: WikiVariables

Category.Documentation