public class

WikiToXhtmlMigrator

extends Object
implements ExceptionTolerantMigrator
java.lang.Object
   ↳ com.atlassian.confluence.content.render.xhtml.migration.WikiToXhtmlMigrator

Class Overview

Convert wiki formatted text to the XHTML format used for storage from Confluence 4.0.

Based on com.atlassian.renderer.v2.V2RendererFacade (which we aren't using because it would cause spring autowiring by type to fail because there would then be two beans that implement com.atlassian.renderer.WikiStyleRenderer.

Summary

Public Constructors
WikiToXhtmlMigrator(RendererConfiguration rendererConfiguration, LinkRenderer defaultLinkRenderer, EmbeddedResourceRenderer defaultEmbeddedRenderer, ErrorReportingV2Renderer renderer)
Public Methods
String migrate(String wiki, RenderContext context, List<RuntimeException> exceptions)

Convert wiki text to storage format XHTML.

[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.content.render.xhtml.migration.ExceptionTolerantMigrator

Public Constructors

public WikiToXhtmlMigrator (RendererConfiguration rendererConfiguration, LinkRenderer defaultLinkRenderer, EmbeddedResourceRenderer defaultEmbeddedRenderer, ErrorReportingV2Renderer renderer)

Public Methods

public String migrate (String wiki, RenderContext context, List<RuntimeException> exceptions)

Convert wiki text to storage format XHTML. Even on the event of any exceptions occurring during migration (as reported via the exceptions parameter) suitable storage XHTML formatted data will be returned.

Parameters
wiki wiki formatted String to be migrated to storage XHTML.
context the context for the rendering during this migration
exceptions a List to add any migration exceptions too as they occur (this may be null if you don't care about exceptions)
Returns
  • an XHTML formatted String suitable for storage. Even on the event of exceptions the returned String will still have been migrated in a manner suitable for XHTML storage.