Class V2CompatibilityMacro

  extended by com.atlassian.confluence.macro.V2CompatibilityMacro
All Implemented Interfaces:

public class V2CompatibilityMacro
extends Object
implements Macro

A wrapper macro that retains compatibility with our old V2 macros. By default all bodyless V2 macros are wrapped. V2 macros with bodies are only wrapped if there is a bodyType attribute in the <macro>. This is ignored in pre 4.0 systems.

Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.confluence.macro.Macro
Macro.BodyType, Macro.OutputType
Constructor Summary
V2CompatibilityMacro(com.atlassian.renderer.v2.macro.Macro v2Macro, Macro.BodyType bodyType)
Method Summary
 String execute(Map<String,String> parameters, String body, ConversionContext conversionContext)
 Macro.BodyType getBodyType()
          The type of body that this macro has, this is used to infer the migration task if no custom one is provided.
 Macro.OutputType getOutputType()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public V2CompatibilityMacro(com.atlassian.renderer.v2.macro.Macro v2Macro,
                            Macro.BodyType bodyType)
Method Detail


public String execute(Map<String,String> parameters,
                      String body,
                      ConversionContext conversionContext)
               throws MacroExecutionException
Specified by:
execute in interface Macro


public Macro.BodyType getBodyType()
Description copied from interface: Macro
The type of body that this macro has, this is used to infer the migration task if no custom one is provided.

Specified by:
getBodyType in interface Macro
The type of body this macro has.


public Macro.OutputType getOutputType()
Specified by:
getOutputType in interface Macro

Copyright © 2003–2015 Atlassian. All rights reserved.