Class PluginManager
java.lang.Object
org.aavso.tools.vstar.ui.dialog.plugin.manager.PluginManager
This class manages plug-in installation, deletion, and update.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanarePluginsEqual(String description) Does the plugin description for a remote and local plugin refer to the same jar?voidDelete all locally installed plug-ins.voiddeletePlugin(String description) Delete the specified plugin and dependent libraries.voidDetermine whether plugins that are both local and remote refer to the same jar and cache this information.getLibs()getPluginDocName(String description) static StringReturn the plug-ins base URL according to preferences.voidinit()Initialise manager.voidinstallPlugin(String description, PluginManager.Operation op) Install the specified plugin and dependent libraries.voidInterrupts the current operation.booleanDoes the plugin description correspond to a local plugin?booleanDoes the plugin description correspond to a remote plugin?booleanisRemoteAndLocal(String description) Does the plugin description correspond to both a remote and local plugin?voidRetrieve information about locally installed plugins.voidRetrieve information about the available remotePlugins for this version of VStar.voidretrieveRemotePluginInfo(String baseUrlStr) Retrieve information about the available remotePlugins for this version of VStar.static voidsetAllObsSourcePluginsInFileMenu(boolean state) Set whether all observation source plug-ins be shown in the file menu according to preferences?static voidsetLoadPlugins(boolean state) Set the load plug-ins preference.static voidsetPluginsBaseUrl(String url) Set the plug-ins base URL preference.static booleanShould all observation source plug-ins be shown in the file menu according to preferences? Defaults to false.static booleanShould plug-ins be loaded according to preferences?
-
Field Details
-
DEFAULT_PLUGIN_BASE_URL_STR
-
PLUGINS_LIST_FILE
- See Also:
-
PLUGINS_DIR
- See Also:
-
PLUGIN_LIBS_DIR
- See Also:
-
-
Constructor Details
-
PluginManager
public PluginManager()Constructor
-
-
Method Details
-
getRemotePluginsByJarName
- Returns:
- the remote plugins map
-
init
public void init()Initialise manager. -
shouldLoadPlugins
public static boolean shouldLoadPlugins()Should plug-ins be loaded according to preferences? -
setLoadPlugins
public static void setLoadPlugins(boolean state) Set the load plug-ins preference.- Parameters:
state- The true/false state to set.
-
shouldAllObsSourcePluginsBeInFileMenu
public static boolean shouldAllObsSourcePluginsBeInFileMenu()Should all observation source plug-ins be shown in the file menu according to preferences? Defaults to false. -
setAllObsSourcePluginsInFileMenu
public static void setAllObsSourcePluginsInFileMenu(boolean state) Set whether all observation source plug-ins be shown in the file menu according to preferences?- Parameters:
state- The true/false state to set.
-
getPluginsBaseUrl
Return the plug-ins base URL according to preferences. -
setPluginsBaseUrl
Set the plug-ins base URL preference.- Parameters:
url- The URL to set.
-
getRemoteDescriptionsToJarName
- Returns:
- the remote plugin map
-
getRemoteDescriptions
- Returns:
- the remote plugin descriptions
-
getLocalPluginsByJarName
- Returns:
- the local plugins map
-
getLocalDescriptionsToJarName
- Returns:
- the local descriptions map
-
getLocalDescriptions
- Returns:
- the local plugin descriptions
-
getLibs
- Returns:
- the libs
-
getPluginDocName
- Returns:
- the plugin document name.
-
isRemote
Does the plugin description correspond to a remote plugin?- Parameters:
description- The description.- Returns:
- True if the plugin is remote, false if not.
-
isLocal
Does the plugin description correspond to a local plugin?- Parameters:
description- The description.- Returns:
- True if the plugin is local, false if not.
-
isRemoteAndLocal
Does the plugin description correspond to both a remote and local plugin?- Parameters:
description- The description.- Returns:
- True if the plugin is both remote and local, false if not.
-
determinePluginEquality
public void determinePluginEquality()Determine whether plugins that are both local and remote refer to the same jar and cache this information. -
arePluginsEqual
Does the plugin description for a remote and local plugin refer to the same jar?- Parameters:
description- The description.- Returns:
- True iff the equal, false if not.
-
retrieveRemotePluginInfo
Retrieve information about the available remotePlugins for this version of VStar.- Parameters:
baseUrlStr- The base URL string from where to obtain remotePlugins.
-
retrieveRemotePluginInfo
public void retrieveRemotePluginInfo()Retrieve information about the available remotePlugins for this version of VStar. -
retrieveLocalPluginInfo
public void retrieveLocalPluginInfo()Retrieve information about locally installed plugins. -
installPlugin
Install the specified plugin and dependent libraries.- Parameters:
description- The plugin description corresponding to the remote plugin and dependent libraries to be installed.op- The operation (install or update).
-
deletePlugin
Delete the specified plugin and dependent libraries.- Parameters:
description- The plugin description corresponding to the local plugin and dependent libraries to be deleted.
-
deleteAllPlugins
public void deleteAllPlugins()Delete all locally installed plug-ins. -
interrupt
public void interrupt()Interrupts the current operation.
-