Interface MacroDescriptor
-
- All Known Implementing Classes:
AbstractMacroDescriptor
,DefaultMacroDescriptor
public interface MacroDescriptor
Describe a Macro (macro description and macro parameters description).- Since:
- 1.6M1
- Version:
- $Id: 2042c3be3a9626e6b6f56b49935aee2d6244d274 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ContentDescriptor
getContentDescriptor()
default Set<String>
getDefaultCategories()
A macro defines a set of classification categories under which it falls.String
getDescription()
MacroId
getId()
String
getName()
Map<String,ParameterDescriptor>
getParameterDescriptorMap()
Get all the parameters descriptors.Class<?>
getParametersBeanClass()
default boolean
supportsInlineMode()
-
-
-
Method Detail
-
getId
MacroId getId()
- Returns:
- the id of the macro
- Since:
- 2.3M1
-
getName
String getName()
- Returns:
- the human-readable name of the macro (eg "Table Of Contents" for the TOC macro).
- Since:
- 2.0M3
-
getDescription
String getDescription()
- Returns:
- the description of the macro.
-
getParametersBeanClass
Class<?> getParametersBeanClass()
- Returns:
- the class of the JAVA bean containing macro parameters.
-
getContentDescriptor
ContentDescriptor getContentDescriptor()
- Returns:
- describe the macro content. If null the macro does not support content.
- Since:
- 1.9M1
-
getParameterDescriptorMap
Map<String,ParameterDescriptor> getParameterDescriptorMap()
Get all the parameters descriptors.The
Map
key is lower case.ParameterDescriptor.getId()
can be used to access the source parameter identifier (with the source case).- Returns:
- a
Map
containing theParameterDescriptor
for each parameter (the keys are lower cased). - Since:
- 1.7M2
-
getDefaultCategories
default Set<String> getDefaultCategories()
A macro defines a set of classification categories under which it falls. For instance, the "skype" macro would fall under the "Communication" and "Video" categories. However, a wiki administrator has the ability to override the default categories for a given macro in order to organize categories as he or she sees fit. Thus, these default categories are only an indication from the macro author about what categories the macro should fall.- Returns:
- the default categories under which this macro should be listed, or the empty list of the macro does not have any default category defined
- Since:
- 14.6RC1
-
supportsInlineMode
default boolean supportsInlineMode()
- Returns:
- true if the macro can be inserted in some existing content such as a paragraph, a list item etc. For
example if I have
== hello {{velocity}}world{{/velocity}}
then the Velocity macro must support the inline mode and not generate a paragraph. - Since:
- 10.10RC1
-
-