How to write a page/attachment provider
See also:
See the starting point for developing custom Page/Attachment providers to create a maven project holding the custom extension.
Code#
Coding a Page / Attachment provider is pretty straightforward:
- Page provider's class should implement the org.apache.wiki.api.providers.PageProvider interface
- Attachment provider's class should implement the org.apache.wiki.api.providers.AttachmentProvider interface
and that's it!
Unit testing#
Package #
Deploy#
JSPWiki has to be notified that the Page / Attachment provider is going to be used. For that, a couple of entries in jspwiki-[custom].properties are used:
- For Page providers, the jspwiki.pageProvider entry should contain the fully qualified name of the new Page provider.
- For Attachment providers, the jspwiki.attachmentProvider entry should contain the fully qualified name of the new Attachment provider.