Class PluginManager

java.lang.Object
org.aavso.tools.vstar.ui.dialog.plugin.manager.PluginManager

public class PluginManager extends Object
This class manages plug-in installation, deletion, and update.
  • Field Details

  • Constructor Details

    • PluginManager

      public PluginManager()
      Constructor
  • Method Details

    • getRemotePluginsByJarName

      public Map<String,URL> 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

      public static String getPluginsBaseUrl()
      Return the plug-ins base URL according to preferences.
    • setPluginsBaseUrl

      public static void setPluginsBaseUrl(String url)
      Set the plug-ins base URL preference.
      Parameters:
      url - The URL to set.
    • getRemoteDescriptionsToJarName

      public Map<String,String> getRemoteDescriptionsToJarName()
      Returns:
      the remote plugin map
    • getRemoteDescriptions

      public Set<String> getRemoteDescriptions()
      Returns:
      the remote plugin descriptions
    • getLocalPluginsByJarName

      public Map<String,File> getLocalPluginsByJarName()
      Returns:
      the local plugins map
    • getLocalDescriptionsToJarName

      public Map<String,String> getLocalDescriptionsToJarName()
      Returns:
      the local descriptions map
    • getLocalDescriptions

      public Set<String> getLocalDescriptions()
      Returns:
      the local plugin descriptions
    • getLibs

      public Map<String,List<URL>> getLibs()
      Returns:
      the libs
    • getPluginDocName

      public String getPluginDocName(String description)
      Returns:
      the plugin document name.
    • isRemote

      public boolean isRemote(String description)
      Does the plugin description correspond to a remote plugin?
      Parameters:
      description - The description.
      Returns:
      True if the plugin is remote, false if not.
    • isLocal

      public boolean isLocal(String description)
      Does the plugin description correspond to a local plugin?
      Parameters:
      description - The description.
      Returns:
      True if the plugin is local, false if not.
    • isRemoteAndLocal

      public boolean isRemoteAndLocal(String description)
      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

      public boolean arePluginsEqual(String description)
      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

      public void retrieveRemotePluginInfo(String baseUrlStr)
      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

      public void installPlugin(String description, PluginManager.Operation op)
      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

      public void deletePlugin(String description)
      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.