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


public interface WikiRenderer

A wiki renderer interface for plugins.


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

Method Detail

render

java.lang.String render(java.lang.CharSequence wikiText)
Same as calling render(CharSequence, com.atlassian.renderer.RenderContext) with a null context.

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

render

java.lang.String render(java.lang.CharSequence wikiText,
                        com.atlassian.renderer.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

renderPlain

java.lang.String renderPlain(java.lang.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)

renderPlain

java.lang.String renderPlain(java.lang.CharSequence wikiText,
                             com.atlassian.renderer.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)

setupRenderContextProperties

<T extends com.atlassian.renderer.RenderContext> 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.