public class WikiToXhtmlMigrator extends Object implements ExceptionTolerantMigrator
Convert wiki formatted text to the XHTML format used for storage from Confluence 4.0.
Based on 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 WikiStyleRenderer
.
ExceptionTolerantMigrator.MigrationResult
Constructor and Description |
---|
WikiToXhtmlMigrator(com.atlassian.renderer.RendererConfiguration rendererConfiguration,
com.atlassian.renderer.links.LinkRenderer defaultLinkRenderer,
com.atlassian.renderer.embedded.EmbeddedResourceRenderer defaultEmbeddedRenderer,
ErrorReportingV2Renderer renderer) |
Modifier and Type | Method and Description |
---|---|
ExceptionTolerantMigrator.MigrationResult |
migrate(String wiki,
ConversionContext conversionContext)
Migrate the supplied content.
|
String |
migrate(String wiki,
com.atlassian.renderer.RenderContext context,
List<RuntimeException> exceptions)
Convert wiki text to storage format XHTML.
|
public WikiToXhtmlMigrator(com.atlassian.renderer.RendererConfiguration rendererConfiguration, com.atlassian.renderer.links.LinkRenderer defaultLinkRenderer, com.atlassian.renderer.embedded.EmbeddedResourceRenderer defaultEmbeddedRenderer, ErrorReportingV2Renderer renderer)
public String migrate(String wiki, com.atlassian.renderer.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.
migrate
in interface ExceptionTolerantMigrator
wiki
- wiki formatted String to be migrated to storage XHTML.context
- the context for the rendering during this migrationexceptions
- a List to add any migration exceptions too as they occur (this may be null if you don't care about exceptions)public ExceptionTolerantMigrator.MigrationResult migrate(String wiki, ConversionContext conversionContext)
ExceptionTolerantMigrator
migrate
in interface ExceptionTolerantMigrator
wiki
- the comtent to be migratedconversionContext
- the context to be applied for this migrationExceptionTolerantMigrator.MigrationResult
containing the migrated content (if any), as well as indications of failures.Copyright © 2003–2016 Atlassian. All rights reserved.