com.atlassian.confluence.macro.xhtml
Class V2MacroToUnmigratedWikiMarkupMacroMigration

java.lang.Object
  extended by com.atlassian.confluence.macro.xhtml.V2MacroToUnmigratedWikiMarkupMacroMigration
All Implemented Interfaces:
MacroMigration

public class V2MacroToUnmigratedWikiMarkupMacroMigration
extends Object
implements MacroMigration

Responsible for wrapping a string containing a wiki macro declaration (say "{foo}bar{foo}") inside an XHTML wiki markup macro.

Takes a MacroDefinition that represents the state of v2 macro and serializes it to wiki markup. After serialization, wrap the result in an XHTML wiki markup macro.

Respects inline and block output types by migrating to an appropriate inline or block version of the wiki markup macro.

TokenType.INLINE_BLOCK represents v2 macros that can be positioned either inline or own their own. Conservatively migrate these as inline wiki markup macros.

For unknown v2 macros, convert to inline wiki markup also.


Constructor Summary
V2MacroToUnmigratedWikiMarkupMacroMigration(com.atlassian.renderer.v2.macro.MacroManager v2MacroManager)
           
 
Method Summary
 MacroDefinition migrate(MacroDefinition macroDefinition, ConversionContext conversionContext)
          Migrates a wiki-markup representation of a macro to XHTML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

V2MacroToUnmigratedWikiMarkupMacroMigration

public V2MacroToUnmigratedWikiMarkupMacroMigration(com.atlassian.renderer.v2.macro.MacroManager v2MacroManager)
Method Detail

migrate

public MacroDefinition migrate(MacroDefinition macroDefinition,
                               ConversionContext conversionContext)
Description copied from interface: MacroMigration
Migrates a wiki-markup representation of a macro to XHTML

Specified by:
migrate in interface MacroMigration
Parameters:
macroDefinition - The MacroDefinition in wiki-markup form.
conversionContext - The ConversionContext to perform the migration under.
Returns:
An XHTML representation of the macro.


Copyright © 2003–2015 Atlassian. All rights reserved.