Package com.atlassian.confluence.macro
Class V2CompatibilityMacro
- java.lang.Object
-
- com.atlassian.confluence.macro.V2CompatibilityMacro
-
- All Implemented Interfaces:
Macro
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 abodyTypeattribute 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
Constructors Constructor Description V2CompatibilityMacro(com.atlassian.renderer.v2.macro.Macro v2Macro, Macro.BodyType bodyType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringexecute(Map<String,String> parameters, String body, ConversionContext conversionContext)Macro.BodyTypegetBodyType()The type of body that this macro has, this is used to infer the migration task if no custom one is provided.Macro.OutputTypegetOutputType()
-
-
-
Constructor Detail
-
V2CompatibilityMacro
public V2CompatibilityMacro(com.atlassian.renderer.v2.macro.Macro v2Macro, Macro.BodyType bodyType)
-
-
Method Detail
-
execute
public String execute(Map<String,String> parameters, String body, ConversionContext conversionContext) throws MacroExecutionException
- Specified by:
executein interfaceMacro- Throws:
MacroExecutionException
-
getBodyType
public Macro.BodyType getBodyType()
Description copied from interface:MacroThe type of body that this macro has, this is used to infer the migration task if no custom one is provided.- Specified by:
getBodyTypein interfaceMacro- Returns:
- The type of body this macro has.
-
getOutputType
public Macro.OutputType getOutputType()
- Specified by:
getOutputTypein interfaceMacro
-
-