public interface

WikiRenderer

com.atlassian.fisheye.plugin.web.helpers.WikiRenderer

Class Overview

A wiki renderer interface for plugins.

Summary

Public Methods
abstract String render(CharSequence wikiText, RenderContext renderContext)
Renders the given wikiText into html, using the given context.
abstract String render(CharSequence wikiText)
abstract String renderPlain(CharSequence wikiText, RenderContext renderContext)
Renders the wikitext in plain text.
abstract String renderPlain(CharSequence wikiText)
Same as calling renderPlain(CharSequence, com.atlassian.renderer.RenderContext) with a null render context.
abstract <T extends RenderContext> T setupRenderContextProperties(T renderContext)
setting up the context's baseUrl, siteRoot and imagePath properties.

Public Methods

public abstract String render (CharSequence wikiText, RenderContext renderContext)

Renders the given wikiText into html, using the given context.

Parameters
wikiText the wiki text to render
renderContext The context contains information about the urls of images, the type of render, and other contextual information required by various component renderers. If null, the default configurations will be used. A correctly setup context may be obtained by calling setupRenderContextProperties(com.atlassian.renderer.RenderContext), and passing in a new RenderContext().
Returns
  • the rendered html

public abstract String render (CharSequence wikiText)

Parameters
wikiText the wiki text to render
Returns
  • the given wikiText as a html string

public abstract String renderPlain (CharSequence wikiText, RenderContext renderContext)

Renders the wikitext in plain text.

Parameters
wikiText the wiki text to render
renderContext the render context. see render(CharSequence, com.atlassian.renderer.RenderContext) for information on the render context.
Returns
  • the given wikitext in plain, non-html form. Suitable for use in plain text situations, where html is inappropriate (e.g., email)

public abstract String renderPlain (CharSequence wikiText)

Same as calling renderPlain(CharSequence, com.atlassian.renderer.RenderContext) with a null render context.

Parameters
wikiText the wiki text to render
Returns
  • the given wikitext in plain, non-html form. Suitable for use in plain text situations, where html is inappropriate (e.g., email)

public abstract T setupRenderContextProperties (T renderContext)

setting up the context's baseUrl, siteRoot and imagePath properties.

Parameters
renderContext the RenderContext to set the properties on.
Returns
  • the given renderContext, with its properties setup properly.