org.exoplatform.wiki.rendering.macro.panel
Class PanelMacro
java.lang.Object
org.xwiki.rendering.macro.AbstractMacro<PanelMacroParameters>
org.exoplatform.wiki.rendering.macro.panel.PanelMacro
- All Implemented Interfaces:
- Comparable<org.xwiki.rendering.macro.Macro<?>>, org.xwiki.component.phase.Initializable, org.xwiki.rendering.macro.Macro<PanelMacroParameters>
@Component(value="panel")
public class PanelMacro
- extends org.xwiki.rendering.macro.AbstractMacro<PanelMacroParameters>
| Fields inherited from class org.xwiki.rendering.macro.AbstractMacro |
beanManager, DEFAULT_CATEGORY_CONTENT, DEFAULT_CATEGORY_DEVELOPMENT, DEFAULT_CATEGORY_FORMATTING, DEFAULT_CATEGORY_NAVIGATION |
|
Constructor Summary |
PanelMacro()
Create and initialize the descriptor of the macro. |
|
Method Summary |
List<org.xwiki.rendering.block.Block> |
execute(PanelMacroParameters parameters,
String content,
org.xwiki.rendering.transformation.MacroTransformationContext context)
|
org.xwiki.component.manager.ComponentManager |
getComponentManager()
|
protected org.xwiki.rendering.parser.Parser |
getSyntaxParser(org.xwiki.rendering.transformation.MacroTransformationContext context)
Get the parser for the current syntax. |
protected List<org.xwiki.rendering.block.Block> |
parseContent(PanelMacroParameters parameters,
String content,
org.xwiki.rendering.transformation.MacroTransformationContext context)
Renders the panel's content (which can contain content in the current syntax). |
protected List<org.xwiki.rendering.block.Block> |
parseSourceSyntax(String content,
org.xwiki.rendering.transformation.MacroTransformationContext context)
Parse provided content with the parser of the current wiki syntax. |
protected List<org.xwiki.rendering.block.Block> |
parseTitle(org.xwiki.rendering.parser.Parser parser,
String titleParameter)
Renders the panel's title (which can contain content in the current syntax). |
boolean |
supportsInlineMode()
|
| Methods inherited from class org.xwiki.rendering.macro.AbstractMacro |
compareTo, getDescriptor, getPriority, initialize, setDefaultCategory, setDescriptor, setPriority |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PanelMacro
public PanelMacro()
- Create and initialize the descriptor of the macro.
execute
public List<org.xwiki.rendering.block.Block> execute(PanelMacroParameters parameters,
String content,
org.xwiki.rendering.transformation.MacroTransformationContext context)
throws org.xwiki.rendering.macro.MacroExecutionException
- Throws:
org.xwiki.rendering.macro.MacroExecutionException
getComponentManager
public org.xwiki.component.manager.ComponentManager getComponentManager()
- Returns:
- the component manager.
supportsInlineMode
public boolean supportsInlineMode()
parseTitle
protected List<org.xwiki.rendering.block.Block> parseTitle(org.xwiki.rendering.parser.Parser parser,
String titleParameter)
throws org.xwiki.rendering.macro.MacroExecutionException
- Renders the panel's title (which can contain content in the current syntax).
- Parameters:
parser - the appropriate syntax parsertitleParameter - the title which is going to be parsed
- Returns:
- the parsing result
- Throws:
org.xwiki.rendering.macro.MacroExecutionException - if the parsing fails
parseContent
protected List<org.xwiki.rendering.block.Block> parseContent(PanelMacroParameters parameters,
String content,
org.xwiki.rendering.transformation.MacroTransformationContext context)
throws org.xwiki.rendering.macro.MacroExecutionException
- Renders the panel's content (which can contain content in the current syntax).
- Parameters:
parameters - content - context -
- Returns:
-
- Throws:
org.xwiki.rendering.macro.MacroExecutionException
parseSourceSyntax
protected List<org.xwiki.rendering.block.Block> parseSourceSyntax(String content,
org.xwiki.rendering.transformation.MacroTransformationContext context)
throws org.xwiki.rendering.macro.MacroExecutionException
- Parse provided content with the parser of the current wiki syntax.
- Parameters:
content - the content to parse.context - the context of the macro transformation.
- Returns:
- an XDOM containing the parser content.
- Throws:
org.xwiki.rendering.macro.MacroExecutionException - failed to parse content
getSyntaxParser
protected org.xwiki.rendering.parser.Parser getSyntaxParser(org.xwiki.rendering.transformation.MacroTransformationContext context)
throws org.xwiki.rendering.macro.MacroExecutionException
- Get the parser for the current syntax.
- Parameters:
context - the context of the macro transformation (from which to get the current syntax)
- Returns:
- the parser for the current syntax
- Throws:
org.xwiki.rendering.macro.MacroExecutionException - Failed to find source parser.
Copyright © 2003–2014 eXo Platform SAS. All rights reserved.