register(DeltaBuilder.update("1.5.0", "Update various configurations for this module and uninstall SimpleMedia module")
.addTask(
new IsModuleInstalledOrRegistered("Uninstall OpenUtils SimpleMedia Module",
"Uninstalls OpenUtils SimpleMedia Module if it is installed",
"media",
new ArrayDelegateTask("Uninstall OpenUtils SimpleMedia module",
"Removes all configuration related to the OpenUtils SimpleMedia module",
new CheckAndModifyPropertyValueTask("Update Magnolia Standard Templating Kit template-renderers",
"Update Magnolia Standard Templating Kit template-renderers back to the default since we are removing the OpenUtils SimpleMedia module",
ContentRepository.CONFIG,
"/modules/standard-templating-kit/template-renderers/stk",
"renderer",
"net.sourceforge.openutils.mgnlmedia.freemarker.SktSimpleMediaTemplateRenderer",
"info.magnolia.module.templatingkit.renderers.STKTemplateRenderer"),
new CheckAndModifyPropertyValueTask("Update Magnolia Standard Templating Kit paragraph-renderers",
"Update Magnolia Standard Templating Kit paragraph-renderers back to the default since we are removing the OpenUtils SimpleMedia module",
ContentRepository.CONFIG,
"/modules/standard-templating-kit/paragraph-renderers/stk",
"class",
"net.sourceforge.openutils.mgnlmedia.freemarker.SktSimpleMediaParagraphRenderer",
"info.magnolia.module.templatingkit.renderers.STKParagraphRenderer"),
new NodeExistsDelegateTask("Remove 'activateMedia' command from adminInterface configuration",
"Removes 'activateMedia' command if it exists",
ContentRepository.CONFIG,
"/modules/adminInterface/commands/default/activateMedia",
new RemoveNodeTask("Remove 'activateMedia' command",
"",
ContentRepository.CONFIG,
"/modules/adminInterface/commands/default/activateMedia")
),
new NodeExistsDelegateTask("Remove 'media' menu from adminInterface configuration",
"Removes 'media' menu if it exists",
ContentRepository.CONFIG,
"/modules/adminInterface/config/menu/media",
new RemoveNodeTask("Remove 'media' menu",
"",
ContentRepository.CONFIG,
"/modules/adminInterface/config/menu/media")
),
new NodeExistsDelegateTask("Remove 'mediaJCR' menu from adminInterface configuration",
"Removes 'mediaJCR' menu if it exists",
ContentRepository.CONFIG,
"/modules/adminInterface/config/menu/tools/mediaJCR",
new RemoveNodeTask("Remove 'mediaJCR' menu",
"",
ContentRepository.CONFIG,
"/modules/adminInterface/config/menu/tools/mediaJCR")
),
new NodeExistsDelegateTask("Remove 'media-selector' from fckEditor configuration",
"Removes 'media-selector' menu if it exists",
ContentRepository.CONFIG,
"/modules/fckEditor/config/browsableRepositories/media-selector",
new RemoveNodeTask("Remove 'media-selector' menu",
"",
ContentRepository.CONFIG,
"/modules/fckEditor/config/browsableRepositories/media-selector")
),
new NodeExistsDelegateTask("Remove 'media' handler from standard-templating-kit damSupport configuration",
"Removes 'media' handler from standard-templating-kit damSupport configuration if it exists",
ContentRepository.CONFIG,
"/modules/standard-templating-kit/config/site/damSupport/handlers/media",
new RemoveNodeTask("Remove 'media' handler",
"",
ContentRepository.CONFIG,
"/modules/standard-templating-kit/config/site/damSupport/handlers/media")
),
new NodeExistsDelegateTask("Remove 'media' module configuration",
"Removes all 'media' module configuration if it exists",
ContentRepository.CONFIG,
"/modules/media",
new RemoveNodeTask("Remove all 'media' module configuration",
"",
ContentRepository.CONFIG,
"/modules/media")
),
new NodeExistsDelegateTask("Remove 'media' mappings from server URI2RespositoryMapping configuration",
"Removes 'media' mappings from server URI2RespositoryMapping if it exists",
ContentRepository.CONFIG,
"/server/URI2RepositoryMapping/mappings/media",
new RemoveNodeTask("Remove 'media' mappings from server URI2RespositoryMapping",
"",
ContentRepository.CONFIG,
"/server/URI2RepositoryMapping/mappings/media")
),
new NodeExistsDelegateTask("Remove 'sample-simplemedia' website",
"Removes 'sample-simplemedia' website if it exists",
ContentRepository.WEBSITE,
"/sample-simplemedia",
new RemoveNodeTask("Remove 'sample-simplemedia' website",
"",
ContentRepository.WEBSITE,
"/sample-simplemedia")
),
new WarnTask("Note: OpenUtils SimpleMedia module configuration and sample content has been removed",
"All configuration and sample content related to OpenUtils SimpleMedia module has been removed.\n" +
"IMPORTANT: Please make sure to:\n" +
"1. Shutdown Magnolia\n" +
"2. Drop the tables prefixed with 'media_' or 'MEDIA_'.\n" +
"3. Delete the 'media' workspace directory from your Magnolia Repositories.\n" +
"4. Delete the 'templates/samples-media' directory from your webapps root directory.\n" +
"5. Startup Magnolia")
)
)
)
);
|