com.atlassian.confluence.macro.xhtml
Class XhtmlWikiMarkupMacroMigrator

java.lang.Object
  extended by com.atlassian.confluence.macro.xhtml.XhtmlWikiMarkupMacroMigrator
All Implemented Interfaces:
ExceptionTolerantMigrator

public class XhtmlWikiMarkupMacroMigrator
extends Object
implements ExceptionTolerantMigrator

A Migrator that accepts storage format XHTML and will attempt to convert any instances of unmigrated-wiki-markup macros found to be direct storage XHTML format and therefore replacing the unmigrated-wiki-markup block.

There is no guarantee that any or all instances of the unmigrated-wiki-markup will be replaced. In some cases instances it will not be possible to migrate individual unmigrated-wiki-markup blocks. However, what can be guaranteed is that the returned String will still be suitable storage XHTML formatted data.


Constructor Summary
XhtmlWikiMarkupMacroMigrator(XhtmlContent xhtmlContent, ExceptionTolerantMigrator delegateMigrator)
           
 
Method Summary
 String migrate(String xhtml, com.atlassian.renderer.RenderContext renderContext, List<RuntimeException> exceptions)
           Attempt to migrate any instances of unmigrated-wiki-markup found in the supplied storage XHTML formatted content to storage XHTML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XhtmlWikiMarkupMacroMigrator

public XhtmlWikiMarkupMacroMigrator(XhtmlContent xhtmlContent,
                                    ExceptionTolerantMigrator delegateMigrator)
Method Detail

migrate

public String migrate(String xhtml,
                      com.atlassian.renderer.RenderContext renderContext,
                      List<RuntimeException> exceptions)

Attempt to migrate any instances of unmigrated-wiki-markup found in the supplied storage XHTML formatted content to storage XHTML.

Specified by:
migrate in interface ExceptionTolerantMigrator
Parameters:
xhtml - storage XHTML formatted String which may contain unmigrated-wiki-markup
renderContext - 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:
a storage XHTML formatted String which may or may not still contain unmigrated-wiki-markup blocks.


Copyright © 2003-2011 Atlassian. All Rights Reserved.