public class DefaultMacroManager extends Object implements MacroManager
Modifier and Type | Field and Description |
---|---|
static String |
RESOURCE_PREFIX |
Constructor and Description |
---|
DefaultMacroManager() |
Modifier and Type | Method and 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.
|
public static final String RESOURCE_PREFIX
public com.atlassian.renderer.v2.macro.Macro getEnabledMacro(String name)
getEnabledMacro
in interface com.atlassian.renderer.v2.macro.MacroManager
public Map<String,com.atlassian.renderer.v2.macro.Macro> getMacros()
MacroManager
UserMacroLibrary
.public void registerMacro(String name, com.atlassian.renderer.v2.macro.Macro macro)
MacroManager
name
- the name to register the macro under. For example, 'code'.macro
- the macro to registerpublic void unregisterMacro(String name)
name
- the name of the macro to unregister. For example, 'code'.public void pluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event)
public void pluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event)
public void setPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
public void setUserMacroLibrary(UserMacroLibrary userMacroLibrary)
Copyright © 2003–2017 Atlassian. All rights reserved.