P - the type of macro parameters bean.public abstract class AbstractBoxMacro<P extends BoxMacroParameters> extends AbstractMacro<P>
beanManager, DEFAULT_CATEGORY_CONTENT, DEFAULT_CATEGORY_DEVELOPMENT, DEFAULT_CATEGORY_FORMATTING, DEFAULT_CATEGORY_INTERNAL, DEFAULT_CATEGORY_NAVIGATION| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBoxMacro(String name,
String description,
ContentDescriptor contentDescriptor,
Class<?> parametersBeanClass)
Creates a new box macro.
|
| Modifier and Type | Method and Description |
|---|---|
List<Block> |
execute(P parameters,
String content,
MacroTransformationContext context) |
protected String |
getClassProperty() |
protected MacroContentParser |
getMacroContentParser() |
protected abstract List<Block> |
parseContent(P parameters,
String content,
MacroTransformationContext context)
Execute macro content and return the result.
|
boolean |
supportsInlineMode() |
compareTo, getDescriptor, getPriority, initialize, setDefaultCategory, setDescriptor, setPriorityprotected AbstractBoxMacro(String name, String description, ContentDescriptor contentDescriptor, Class<?> parametersBeanClass)
name - the name of the macrodescription - string describing this macro.contentDescriptor - the ContentDescriptor describing the content of this macro.parametersBeanClass - class of the parameters bean.public boolean supportsInlineMode()
public List<Block> execute(P parameters, String content, MacroTransformationContext context) throws MacroExecutionException
MacroExecutionExceptionprotected abstract List<Block> parseContent(P parameters, String content, MacroTransformationContext context) throws MacroExecutionException
execute(BoxMacroParameters, String, MacroTransformationContext) to be able to overwrite it in macro
which need boxes.parameters - the parameters of the macro.content - the content of the macro.context - the context if the macros transformation.MacroExecutionException - error when executing the macro.protected String getClassProperty()
protected MacroContentParser getMacroContentParser()
Copyright © 2004–2016 XWiki. All rights reserved.