Class DefaultMacroManager
- java.lang.Object
-
- com.atlassian.confluence.renderer.DefaultMacroManager
-
- All Implemented Interfaces:
MacroManager
,com.atlassian.renderer.v2.macro.MacroManager
public class DefaultMacroManager extends Object implements MacroManager
-
-
Field Summary
Fields Modifier and Type Field Description static String
RESOURCE_PREFIX
-
Constructor Summary
Constructors Constructor Description DefaultMacroManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.atlassian.renderer.v2.macro.Macro
getEnabledMacro(String name)
Map<String,com.atlassian.renderer.v2.macro.Macro>
getMacros()
Returns the currently enabled macros, excluding user macros.void
pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
void
pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
void
registerMacro(String name, com.atlassian.renderer.v2.macro.Macro macro)
Registers a new macro with the given name.void
setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
void
setUserMacroLibrary(UserMacroLibrary userMacroLibrary)
void
unregisterMacro(String name)
Unregisters the macro with the given name.
-
-
-
Field Detail
-
RESOURCE_PREFIX
public static final String RESOURCE_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
getEnabledMacro
public com.atlassian.renderer.v2.macro.Macro getEnabledMacro(String name)
- Specified by:
getEnabledMacro
in interfacecom.atlassian.renderer.v2.macro.MacroManager
-
getMacros
public Map<String,com.atlassian.renderer.v2.macro.Macro> getMacros()
Description copied from interface:MacroManager
Returns the currently enabled macros, excluding user macros. For a list of user macros, seeUserMacroLibrary
.- Specified by:
getMacros
in interfaceMacroManager
-
registerMacro
public void registerMacro(String name, com.atlassian.renderer.v2.macro.Macro macro)
Description copied from interface:MacroManager
Registers a new macro with the given name. If a macro already exists with that name, it is replaced by the new macro.- Specified by:
registerMacro
in interfaceMacroManager
- Parameters:
name
- the name to register the macro under. For example, 'code'.macro
- the macro to register
-
unregisterMacro
public void unregisterMacro(String name)
Unregisters the macro with the given name. Does nothing if no macro exists with that name.- Specified by:
unregisterMacro
in interfaceMacroManager
- Parameters:
name
- the name of the macro to unregister. For example, 'code'.
-
pluginModuleEnabled
public void pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
-
pluginModuleDisabled
public void pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
-
setPluginEventManager
public void setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
-
setUserMacroLibrary
public void setUserMacroLibrary(UserMacroLibrary userMacroLibrary)
-
-