Class DefaultMacroMigrationManager
java.lang.Object
com.atlassian.confluence.macro.xhtml.DefaultMacroMigrationManager
- All Implemented Interfaces:
MacroMigrationManager
Listens for plugin events and registers / unregisters the macro migration tasks with itself.
The migration tasks are wrapped in a LazyReference in order to only
instantiate them upon first usage.
This MacroMigrationManager uses a white list of macro names that may be migrated. The default set of names is supplied on construction and additional names are read as comma separated values from the System property "confluence.macro.migration.white.list".
- Since:
- 4.0
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultMacroMigrationManager(MacroMigration richTextMacroMigration, MacroMigration plainTextMacroMigration, MacroMigration v2MacroToUnmigratedWikiMarkupMacroMigration, MacroManager xhtmlOnlyMacroManager, MacroManager v2CompatibileMacroManager, MacroManager v2MacroManager, Set<String> whitelistedNames) Sets the macro manager and the migration tasks for the rich text and plain text migrations. -
Method Summary
Modifier and TypeMethodDescriptiongetMacroMigration(String macroName) Returns theMacroMigrationfor the given macro.voidpluginModuleDisabled(com.atlassian.plugin.event.events.PluginModuleDisabledEvent event) voidpluginModuleEnabled(com.atlassian.plugin.event.events.PluginModuleEnabledEvent event) voidsetPluginEventManager(com.atlassian.plugin.event.PluginEventManager pluginEventManager)
-
Constructor Details
-
DefaultMacroMigrationManager
public DefaultMacroMigrationManager(MacroMigration richTextMacroMigration, MacroMigration plainTextMacroMigration, MacroMigration v2MacroToUnmigratedWikiMarkupMacroMigration, MacroManager xhtmlOnlyMacroManager, MacroManager v2CompatibileMacroManager, MacroManager v2MacroManager, Set<String> whitelistedNames) Sets the macro manager and the migration tasks for the rich text and plain text migrations.
-
-
Method Details
-
getMacroMigration
Description copied from interface:MacroMigrationManagerReturns theMacroMigrationfor the given macro.If a custom
MacroMigrationis registered for this macro name it will be returned, otherwise if the macro implements theMacrointerface it will return aMacroMigrationbased on the type of macro.- Specified by:
getMacroMigrationin interfaceMacroMigrationManager- Returns:
- a macro migration. Cannot be null.
-
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)
-