Package org.graffiti.managers.pluginmgr
Interface PluginManager
- All Known Implementing Classes:
DefaultPluginManager
public interface PluginManager
Defines an interface for a plugin manager handeling the list of plugins.
-
Method Summary
Modifier and Type Method Description void
addPluginManagerListener(PluginManagerListener listener)
Adds the given plugin manager listener to the list of listeners.GenericPlugin
createInstance(URL pluginLocation)
Returns a new instance of the plugin "main" class with the given plugin name.Collection<PluginEntry>
getPluginEntries()
Returns the current list of plugin entries.Collection<RSSfeedDefinition>
getPluginFeeds()
GenericPlugin
getPluginInstance(String name)
Returns the plugin instance of the given plugin name.boolean
isInstalled(String name)
Returnstrue
, if the plugin with the given name is in the list of currently installed plugins.void
loadPlugin(PluginDescription desc, URL pluginLocation, Boolean loadOnStartup)
Loads the plugin from the given location.void
loadPlugins(PluginEntry[] plugins)
Loads the plugins described by the given entries.void
loadStartupPlugins()
Loads the plugins which should be loaded on startup.void
loadStartupPlugins(ProgressViewer progressViewer)
Loads the plugins which should be loaded on startup.void
removePluginManagerListener(PluginManagerListener listener)
Removes the given plugin manager listener from the list of listeners.void
savePrefs()
Saves the plugin manager's prefs.void
setLoadOnStartup(String name, Boolean loadOnStartup)
Sets theloadOnStartup
flag of the given object, to the given value.
-
Method Details
-
isInstalled
Returnstrue
, if the plugin with the given name is in the list of currently installed plugins.- Returns:
- DOCUMENT ME!
-
setLoadOnStartup
Sets theloadOnStartup
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
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
Adds the given plugin manager listener to the list of listeners.- Parameters:
listener
- the new listener to add to the list.
-
createInstance
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 PluginManagerExceptionLoads the plugin from the given location. If several plugins should be loaded simultaniously, useloadPlugins
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
Loads the plugins described by the given entries.- Parameters:
plugins
-- Throws:
PluginManagerException
-
loadStartupPlugins
Loads the plugins which should be loaded on startup.- Throws:
PluginManagerException
- if an error occurred while loading one of the plugins.
-
loadStartupPlugins
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
Removes the given plugin manager listener from the list of listeners.- Parameters:
listener
- the listener to remove from the list of listeners.
-
savePrefs
Saves the plugin manager's prefs.- Throws:
PluginManagerException
- if an error occurs while saving the preferences.
-
getPluginFeeds
Collection<RSSfeedDefinition> getPluginFeeds()
-