com.atlassian.confluence.macro
Interface StreamableMacro
- All Superinterfaces:
- Macro
- All Known Implementing Classes:
- StreamableMacroAdapter
public interface StreamableMacro
- extends Macro
Macro that consumes and produces Streamables instead of Strings. Streamable macros should be more efficient than
a regular macro, especially in situations where the body of the macro is likely to be large, and processing on the
body is either unnecessary or can be delayed until write time.
Error handling: MacroExecutionExceptions thrown from execute()
will be handled normally, and
the macro output will be replaced with the appropriate error message. This service is not available to the
streamable's writeTo()
method. If an error is likely to occur during streaming of the output, the macro
must handle processing and displaying the error itself.
executeToStream
Streamable executeToStream(java.util.Map<java.lang.String,java.lang.String> parameters,
Streamable body,
ConversionContext context)
throws MacroExecutionException
- Execute the macro, and produce a streamable that represents its output.
- Parameters:
parameters
- the parameters with which to execute the macrobody
- the body of the macro provided as a streamable, processed according to Macro.getBodyType()
context
- the conversion context of the current rendering pipeline
- Returns:
- a streamable representing the macro output
- Throws:
MacroExecutionException
- if a processing, parsing or parameter validation error occurs during parsing- See Also:
Macro.execute(java.util.Map, String, com.atlassian.confluence.content.render.xhtml.ConversionContext)
Copyright © 2003-2013 Atlassian. All Rights Reserved.