All Known Implementing Classes:
PluginsImpl

public interface Plugins
This is a utility class that uses UPM's restful interface to find out info about installed plugins and enable/disable them

All of these functions will try to return you to the page you were on before calling them.

Since:
v4.3
  • Method Details

    • isPluginInstalled

      boolean isPluginInstalled(String pluginKey)
      Checks if the plugin is found in the UPM.
      Parameters:
      pluginKey - - the key for the plugin eg. com.atlassian.examplePlugin
      Returns:
      if the plugin is installed on the instance.
    • canDisablePluginModule

      boolean canDisablePluginModule(String pluginKey, String completeModuleKey)
      Is it possible to disable a module of a plugin.
      Parameters:
      pluginKey - - the key for the plugin eg. com.atlassian.examplePlugin
      completeModuleKey - - the key for the module eg. com.atlassian.examplePlugin:exampleModule
      Returns:
      if the module is able to be disabled (ie. optional)
    • canDisablePlugin

      boolean canDisablePlugin(String pluginKey)
      Is it possible to disable a plugin.
      Parameters:
      pluginKey - - the key for the plugin eg. com.atlassian.examplePlugin
      Returns:
      if the plugin is able to be disabled (ie. optional)
    • enablePlugin

      void enablePlugin(String pluginKey)
      Tries to enable a plugin (so long as it is installed).
      Parameters:
      pluginKey - - the key for the plugin eg. com.atlassian.examplePlugin
    • disablePlugin

      void disablePlugin(String pluginKey)
      Tries to disable a plugin (so long as it is installed).
      Parameters:
      pluginKey - - the key for the plugin eg. com.atlassian.examplePlugin
    • enablePluginModule

      void enablePluginModule(String pluginKey, String completeModuleKey)
      Tries to enable a module within a plugin.
      Parameters:
      pluginKey - - the key for the plugin eg. com.atlassian.examplePlugin
      completeModuleKey - - the key for the module eg. com.atlassian.examplePlugin:exampleModule
    • disablePluginModule

      void disablePluginModule(String pluginKey, String completeModuleKey)
      Tries to disable a module within a plugin.
      Parameters:
      pluginKey - - the key for the plugin eg. com.atlassian.examplePlugin
      completeModuleKey - - the key for the module eg. com.atlassian.examplePlugin:exampleModule
    • isPluginEnabled

      boolean isPluginEnabled(String pluginKey)
      Is a plugin enabled.
      Parameters:
      pluginKey - - the key of the plugin to check eg. com.atlassian.examplePlugin
      Returns:
      true if the plugin is enabled; otherwise, false.
    • isPluginDisabled

      boolean isPluginDisabled(String pluginKey)
      Is a plugin disabled.
      Parameters:
      pluginKey - - the key of the plugin to check eg. com.atlassian.examplePlugin
      Returns:
      true if the plugin is disabled; otherwise, false.
    • isPluginModuleEnabled

      boolean isPluginModuleEnabled(String pluginKey, String completeModuleKey)
      Is a module of a plugin enabled.
      Parameters:
      pluginKey - - the key for the plugin eg. com.atlassian.examplePlugin
      completeModuleKey - - the key for the module eg. com.atlassian.examplePlugin:exampleModule
      Returns:
      true if the module is enabled; otherwise, false.
    • isPluginModuleDisabled

      boolean isPluginModuleDisabled(String pluginKey, String completeModuleKey)
      Is a module of a plugin disabled.
      Parameters:
      pluginKey - - the key of the plugin eg. com.atlassian.examplePlugin
      completeModuleKey - - the key of the module to check eg. com.atlassian.examplePlugin:exampleModule
      Returns:
      true if the module is disabled; otherwise, false.
    • referencePlugin

      ReferencePlugin referencePlugin()
      Gets an instance of the reference plugin.
      Returns:
      an instance of the reference plugin.
    • referenceDependentPlugin

      ReferenceDependentPlugin referenceDependentPlugin()
      Gets an instance of the reference dependent plugin.
      Returns:
      an instance of the reference dependent plugin.
    • referenceLanguagePack

      ReferenceLanguagePack referenceLanguagePack()
      Gets an instance of the reference language pack plugin.
      Returns:
      an instance of the reference language pack plugin.