com.atlassian.confluence.macro
Class LazyLoadingMacroWrapper

java.lang.Object
  extended by com.atlassian.confluence.macro.LazyLoadingMacroWrapper
All Implemented Interfaces:
Macro

public class LazyLoadingMacroWrapper
extends Object
implements Macro

Used to wrap a Macro in a LazyReference.

This is used to ensure that the macro is loaded by the module descriptor only on first usage.

Since:
4.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.confluence.macro.Macro
Macro.BodyType, Macro.OutputType
 
Constructor Summary
LazyLoadingMacroWrapper(com.atlassian.util.concurrent.LazyReference<Macro> delegate)
           
 
Method Summary
 String execute(Map<String,String> parameters, String body, ConversionContext context)
           
 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 getMacro()
           
 Macro.OutputType getOutputType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LazyLoadingMacroWrapper

public LazyLoadingMacroWrapper(com.atlassian.util.concurrent.LazyReference<Macro> delegate)
Method Detail

execute

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

getBodyType

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
Returns:
The type of body this macro has.

getOutputType

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

getMacro

public Macro getMacro()


Copyright © 2003-2012 Atlassian. All Rights Reserved.