Class DefaultMacroManager

  • All Implemented Interfaces:
    MacroManager, com.atlassian.renderer.v2.macro.MacroManager

    public class DefaultMacroManager
    extends Object
    implements MacroManager
    • Constructor Detail

      • DefaultMacroManager

        public DefaultMacroManager()
    • Method Detail

      • getEnabledMacro

        public com.atlassian.renderer.v2.macro.Macro getEnabledMacro​(String name)
        Specified by:
        getEnabledMacro in interface com.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, see UserMacroLibrary.
        Specified by:
        getMacros in interface MacroManager
      • 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 interface MacroManager
        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 interface MacroManager
        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)