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

PluginManager.getPlugin() is too fragile

    Details

    • Type: Improvement
    • Status: Resolved (View workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 4.3.2
    • Fix versions: 4.4.0
    • Components: 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:
              Greg Thomas
              Reporter:
              Greg Thomas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: