org.xwiki.rendering.macro.box
Class AbstractBoxMacro<P extends BoxMacroParameters>
java.lang.Object
org.xwiki.rendering.macro.AbstractMacro<P>
org.xwiki.rendering.macro.box.AbstractBoxMacro<P>
- Type Parameters:
P - the type of macro parameters bean.
- All Implemented Interfaces:
- Comparable<Macro<?>>, org.xwiki.component.phase.Initializable, Macro<P>
public abstract class AbstractBoxMacro<P extends BoxMacroParameters>
- extends AbstractMacro<P>
Draw a box around provided content.
- Since:
- 1.7
- Version:
- $Id$
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractBoxMacro
protected AbstractBoxMacro(String name,
String description,
ContentDescriptor contentDescriptor,
Class<?> parametersBeanClass)
- Creates a new box macro.
- Parameters:
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.
supportsInlineMode
public boolean supportsInlineMode()
execute
public List<Block> execute(P parameters,
String content,
MacroTransformationContext context)
throws MacroExecutionException
- Throws:
MacroExecutionException
parseContent
protected abstract List<Block> parseContent(P parameters,
String content,
MacroTransformationContext context)
throws MacroExecutionException
- Execute macro content and return the result. This methods is separated form
execute(BoxMacroParameters, String, MacroTransformationContext) to be able to overwrite it in macro
which need boxes.
- Parameters:
parameters - the parameters of the macro.content - the content of the macro.context - the context if the macros transformation.
- Returns:
- the result of the macro execution.
- Throws:
MacroExecutionException - error when executing the macro.
getClassProperty
protected String getClassProperty()
- Returns:
- the name of the CSS class to use when rendering, in case no cssClass parameter is specified.
getMacroContentParser
protected MacroContentParser getMacroContentParser()
- Returns:
- the macro content parser to use to parse content in wiki syntax
Copyright © 2004-2011 XWiki. All Rights Reserved.