Interface PluginManager

All Known Implementing Classes:
DefaultPluginManager

public interface PluginManager
Defines an interface for a plugin manager handeling the list of plugins.
  • Method Details

    • isInstalled

      boolean isInstalled​(String name)
      Returns true, if the plugin with the given name is in the list of currently installed plugins.
      Returns:
      DOCUMENT ME!
    • setLoadOnStartup

      void setLoadOnStartup​(String name, Boolean loadOnStartup)
      Sets the loadOnStartup flag of the given object, to the given value.
      Parameters:
      name - the name of the plugin.
      loadOnStartup - true, if the plugin should be loaded at startup.
    • getPluginEntries

      Collection<PluginEntry> getPluginEntries()
      Returns the current list of plugin entries.
      Returns:
      a Collection containing all the plugin entries.
    • getPluginInstance

      GenericPlugin getPluginInstance​(String name)
      Returns the plugin instance of the given plugin name.
      Parameters:
      name - the name of the plugin.
      Returns:
      the instance of the plugin of the given name.
    • addPluginManagerListener

      void addPluginManagerListener​(PluginManagerListener listener)
      Adds the given plugin manager listener to the list of listeners.
      Parameters:
      listener - the new listener to add to the list.
    • createInstance

      GenericPlugin createInstance​(URL pluginLocation) throws PluginManagerException
      Returns a new instance of the plugin "main" class with the given plugin name.
      Parameters:
      pluginLocation - the URL to the plugin.
      Returns:
      the instantiated plugin.
      Throws:
      PluginManagerException - if an error occured while loading or instantiating the plugin.
    • loadPlugin

      void loadPlugin​(PluginDescription desc, URL pluginLocation, Boolean loadOnStartup) throws PluginManagerException
      Loads the plugin from the given location. If several plugins should be loaded simultaniously, use loadPlugins instead, since dependencies can then be checked successfully.
      Parameters:
      pluginLocation - the location of the plugin.
      loadOnStartup - true, if the given plugin should be loaded at the startup.
      Throws:
      PluginManagerException - if an error occurs while loading or instantiating the plugin.
    • loadPlugins

      void loadPlugins​(PluginEntry[] plugins) throws PluginManagerException
      Loads the plugins described by the given entries.
      Parameters:
      plugins -
      Throws:
      PluginManagerException
    • loadStartupPlugins

      void loadStartupPlugins() throws PluginManagerException
      Loads the plugins which should be loaded on startup.
      Throws:
      PluginManagerException - if an error occurred while loading one of the plugins.
    • loadStartupPlugins

      void loadStartupPlugins​(ProgressViewer progressViewer) throws PluginManagerException
      Loads the plugins which should be loaded on startup. The progress made is display in progressViewer.
      Parameters:
      progressViewer - A ProgressViewer that display the progress made while loading the plugins
      Throws:
      PluginManagerException - if an error occurred while loading one of the plugins.
    • removePluginManagerListener

      void removePluginManagerListener​(PluginManagerListener listener)
      Removes the given plugin manager listener from the list of listeners.
      Parameters:
      listener - the listener to remove from the list of listeners.
    • savePrefs

      void savePrefs() throws PluginManagerException
      Saves the plugin manager's prefs.
      Throws:
      PluginManagerException - if an error occurs while saving the preferences.
    • getPluginFeeds

      Collection<RSSfeedDefinition> getPluginFeeds()