org.freehep.application.studio.pluginmanager
Class PluginManager
java.lang.Object
org.freehep.application.studio.Plugin
org.freehep.application.studio.pluginmanager.PluginManager
- All Implemented Interfaces:
- Runnable
public class PluginManager
- extends Plugin
- implements Runnable
A Plugin which provides a Plugin Manager.
TODO:
1. Standardize property keys.
2. Inform user if additional plugins are being uninstalled.
3. Do I need update(Component parent, Collection plugins) ?
- Version:
- $Id: PluginManager.java 14533 2013-04-18 22:14:05Z onoprien $
- Author:
- tonyj
PluginManager
public PluginManager()
isCheckAtStart
public boolean isCheckAtStart()
- Getter for property checkAtStart.
If true, the plugin manager will start downloading a list of available
and updatable plugins when the application is started.
getCheckURL
public URL getCheckURL()
- Getter for property checkURL.
URL from which the list of available and updatable plugins should be downloaded.
isRemoveJavaIncompatible
public boolean isRemoveJavaIncompatible()
- Getter for property removeJavaIncompatible.
If true, plugins incompatible with the currently used java runtime version
are uninstalled when extension directories are purged.
isRemoveAppIncompatible
public boolean isRemoveAppIncompatible()
- Getter for property removeAppIncompatible.
If true, plugins incompatible with the currently used application version
are uninstalled when extension directories are purged.
setCheckAtStart
public void setCheckAtStart(boolean checkAtStart)
- Setter for property checkAtStart.
If true, the plugin manager will start downloading a list of available
plugins when the application is started.
setCheckURL
public void setCheckURL(URL checkURL)
- Setter for property checkURL.
URL from which the list of available and plugins should be downloaded.
setRemoveJavaIncompatible
public void setRemoveJavaIncompatible(boolean removeJavaIncompatible)
- Setter for property removeJavaIncompatible.
If true, plugins incompatible with the currently used java runtime version
are uninstalled when extension directories are purged.
setRemoveAppIncompatible
public void setRemoveAppIncompatible(boolean removeAppIncompatible)
- Setter for property removeJavaIncompatible.
If true, plugins incompatible with the currently used application version
are uninstalled when extension directories are purged.
setPluginListHandler
public void setPluginListHandler(PluginListHandler pluginListHandler)
showPluginManager
public void showPluginManager()
- Displays PluginManagerDialog.
Should be called from the event processing thread.
offerUpdate
public void offerUpdate()
- Offers the user to update installed plugins and executes user's command.
Should be called from the event processing thread.
run
public void run()
- Specified by:
run
in interface Runnable
updateInstalledPlugins
public boolean updateInstalledPlugins(Component parent)
- Updates all installed plugins for which newer versions are available.
- Parameters:
parent
- Component to be used as parent by any GUI windows displayed while
executing this method, if any. If null, no error notifications
will be displayed, and IllegalArgumentException will be thrown instead.
- Returns:
- true if restarting the application is required for the changes to take effect.
- Throws:
IllegalArgumentException
- if errors occur while updating, and parent was not specified.
install
public boolean install(Component parent,
Collection<PluginInfo> plugins)
- Installs specified plugins into the application extensions directories.
- Parameters:
parent
- Component to be used as parent by any GUI windows displayed while
executing this method, if any. If null, no error notifications
will be displayed, and IllegalArgumentException will be thrown instead.plugins
- Plugins to be installed. May or may not contain required dependencies.
- Returns:
- true if restarting the application is required for the changes to take effect.
- Throws:
IllegalArgumentException
- if errors occur while updating, and parent was not specified.
uninstall
public boolean uninstall(Component parent,
Collection<PluginInfo> plugins)
- Uninstall specified plugins.
- Parameters:
parent
- Component to be used as parent by any GUI windows displayed while
executing this method, if any. If null, no error notifications
will be displayed, and IllegalArgumentException will be thrown instead.plugins
- Plugins to be uninstalled. May or may not contain required dependencies.
- Returns:
- true if restarting the application is required for the changes to take effect.
- Throws:
IllegalArgumentException
- if errors occur while updating, and parent was not specified.
update
public boolean update(Component parent,
Collection<PluginInfo> plugins)
- Downloads, installs, and loads latest versions of files for the specified plugins.
- Parameters:
parent
- Component to be used as parent by any GUI windows displayed while
executing this method, if any. If null, no error notifications
will be displayed, and IllegalArgumentException will be thrown instead.plugins
- Plugins to update.
- Returns:
- true if restarting the application is required for the changes to take effect.
- Throws:
IllegalArgumentException
- if the update fails, and parent was not specified.
Copyright © 2000-2013 FreeHEP. All Rights Reserved.