Uploaded image for project: 'Openfire'
  1. Openfire
  2. OF-1719

PluginManager.getPlugin() is too fragile

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.3.2
    • Fix Version/s: 4.4.0
    • Component/s: Plugins
    • Labels:
      None

      Description

      The current API for retrieving a plugin is

      PluginManager#getPlugin(String)

      this takes the plugins canonical name, and returns the plugin. The canonical name of the plugin is essentially the lower case file name of the folder it is contained within (e.g. admin, bookmarks, certificatemanager).

      However, this does rely on the plugin being installed with the exact file name that the author intended. Installing the plugin as (e.g.) bookmarks-1.1.0.jar means that calling pluginManager.getPlugin("bookmarks") will fail.

      It is proposed to introduce a new API

      PluginManager.getPluginByName(String)

      that will retrieve the plugin by the name contained with the plugin.xml - this allows the plugin to have any-old name in the plugins folder.

       

        Attachments

          Activity

            People

            Assignee:
            gdt Greg Thomas
            Reporter:
            gdt Greg Thomas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: