Package com.atlassian.confluence.macro
Class StreamableMacroAdapter
- java.lang.Object
 - 
- com.atlassian.confluence.macro.StreamableMacroAdapter
 
 
- 
- All Implemented Interfaces:
 Macro,StreamableMacro
public abstract class StreamableMacroAdapter extends Object implements StreamableMacro
Adapter for theStreamableMacrointerface that provides a default implementation of the redundant execute method. Also provides a static helper method for macros that are unable to extend the adapter due to some other class constraints. 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from interface com.atlassian.confluence.macro.Macro
Macro.BodyType, Macro.OutputType 
 - 
 
- 
Constructor Summary
Constructors Constructor Description StreamableMacroAdapter() 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringexecute(Map<String,String> parameters, String body, ConversionContext context)static StringexecuteFromStream(StreamableMacro macro, Map<String,String> parameters, String body, ConversionContext context)Helper method to provide a default execute method for a StreamableMacro that can not inherit from this adapter class.- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface com.atlassian.confluence.macro.Macro
getBodyType, getOutputType 
- 
Methods inherited from interface com.atlassian.confluence.macro.StreamableMacro
executeToStream 
 - 
 
 - 
 
- 
- 
Method Detail
- 
executeFromStream
public static String executeFromStream(StreamableMacro macro, Map<String,String> parameters, String body, ConversionContext context) throws MacroExecutionException
Helper method to provide a default execute method for a StreamableMacro that can not inherit from this adapter class.- Parameters:
 macro- the macro to executeparameters- the macro parametersbody- the body of the macrocontext- the execution context of the rendering pipeline- Returns:
 - the result of executing the macro
 - Throws:
 MacroExecutionException- some error occurred executing the macro
 
- 
execute
public String execute(Map<String,String> parameters, String body, ConversionContext context) throws MacroExecutionException
- Specified by:
 executein interfaceMacro- Throws:
 MacroExecutionException
 
 - 
 
 -