P - the type of the macro parameters bean@ComponentRole public interface Macro<P> extends Comparable<Macro<?>>
Blocks, that we use as a way to either generate
dynamic content or simply as a way to reuse Blocks in content.| Modifier and Type | Method and Description |
|---|---|
List<Block> |
execute(P parameters,
String content,
MacroTransformationContext context)
Executes the macro.
|
MacroDescriptor |
getDescriptor() |
int |
getPriority()
The priority of execution relative to the other Macros.
|
boolean |
supportsInlineMode() |
compareToint getPriority()
MacroDescriptor getDescriptor()
boolean supportsInlineMode()
== hello {{velocity}}world{{/velocity}} then the Velocity macro must
support the inline mode and not generate a paragraph.List<Block> execute(P parameters, String content, MacroTransformationContext context) throws MacroExecutionException
parameters - the macro parameters in the form of a bean defined by the Macro implementationcontent - the content of the macrocontext - the context of the macros transformation processMacroExecutionException - error when executing the macroCopyright © 2004–2016 XWiki. All rights reserved.