public abstract class AbstractMacroDescriptor extends Object implements MacroDescriptor
| Constructor and Description |
|---|
AbstractMacroDescriptor(MacroId id,
String name,
String description,
ContentDescriptor contentDescriptor,
org.xwiki.properties.BeanDescriptor parametersBeanDescriptor) |
AbstractMacroDescriptor(String name,
String description,
ContentDescriptor contentDescriptor,
org.xwiki.properties.BeanDescriptor parametersBeanDescriptor)
Deprecated.
since 2.3M1 use
AbstractMacroDescriptor(MacroId, String, String, ContentDescriptor, BeanDescriptor) instead |
| Modifier and Type | Method and Description |
|---|---|
protected void |
extractParameterDescriptorMap()
Extract parameters informations from
parametersBeanDescriptor and insert it in
parameterDescriptorMap. |
ContentDescriptor |
getContentDescriptor() |
String |
getDefaultCategory()
A macro can define a default classification category under which it falls.
|
String |
getDescription() |
MacroId |
getId() |
String |
getName() |
Map<String,ParameterDescriptor> |
getParameterDescriptorMap()
Get all the parameters descriptors.
|
Class<?> |
getParametersBeanClass() |
void |
setDefaultCategory(String defaultCategory) |
public AbstractMacroDescriptor(MacroId id, String name, String description, ContentDescriptor contentDescriptor, org.xwiki.properties.BeanDescriptor parametersBeanDescriptor)
id - the id of the macroname - the name of the macro (eg "Table Of Contents" for the TOC macro)description - the description of the macro.contentDescriptor - the description of the macro content. null indicate macro does not support content.parametersBeanDescriptor - the description of the parameters bean or null if there are no parameters for
this macro.@Deprecated public AbstractMacroDescriptor(String name, String description, ContentDescriptor contentDescriptor, org.xwiki.properties.BeanDescriptor parametersBeanDescriptor)
AbstractMacroDescriptor(MacroId, String, String, ContentDescriptor, BeanDescriptor) insteadname - the name of the macro (eg "Table Of Contents" for the TOC macro)description - the description of the macro.contentDescriptor - the description of the macro content. null indicate macro does not support content.parametersBeanDescriptor - the description of the parameters bean or null if there are no parameters for
this macro.protected void extractParameterDescriptorMap()
parametersBeanDescriptor and insert it in
parameterDescriptorMap.public MacroId getId()
getId in interface MacroDescriptorpublic String getName()
getName in interface MacroDescriptorpublic ContentDescriptor getContentDescriptor()
getContentDescriptor in interface MacroDescriptorpublic String getDescription()
getDescription in interface MacroDescriptorpublic Class<?> getParametersBeanClass()
getParametersBeanClass in interface MacroDescriptorpublic Map<String,ParameterDescriptor> getParameterDescriptorMap()
MacroDescriptor
The Map key is lower case. ParameterDescriptor.getId() can be used to access the source parameter
identifier (with the source case).
getParameterDescriptorMap in interface MacroDescriptorMap containing the ParameterDescriptor for each parameter (the keys are lower cased).public String getDefaultCategory()
MacroDescriptorgetDefaultCategory in interface MacroDescriptorpublic void setDefaultCategory(String defaultCategory)
defaultCategory - default category under which this macro should be listed.MacroDescriptor.getDefaultCategory()Copyright © 2004–2017 XWiki. All rights reserved.