@Role
public interface MacroManager
Indeed, a macro can be registered and thus made available for all syntaxes or only available for a given syntax. The latter is useful for example if we want to support copy pasting wiki content from another wiki and we want to support transparently the macros defined in that content; in this case we could implement these macros only for that syntax and in the implementation make the bridge with XWiki macros for example.
Modifier and Type | Method and Description |
---|---|
boolean |
exists(MacroId macroId) |
Macro<?> |
getMacro(MacroId macroId) |
Set<MacroId> |
getMacroIds() |
Set<MacroId> |
getMacroIds(Syntax syntax) |
Set<MacroId> getMacroIds() throws MacroLookupException
MacroLookupException
- error when lookup macrosSet<MacroId> getMacroIds(Syntax syntax) throws MacroLookupException
syntax
- the desired syntaxMacroLookupException
- error when lookup macrosMacro<?> getMacro(MacroId macroId) throws MacroLookupException
macroId
- the id of the macro to lookupMacroLookupException
- when no macro with such id was found in both the list of macro for the specified
syntax identifier and for all syntaxesboolean exists(MacroId macroId)
macroId
- the id of the macro to lookupCopyright © 2004–2022 XWiki. All rights reserved.