Package hudson

Class PluginManager.PluginUpdateMonitor

All Implemented Interfaces:
ExtensionPoint, ModelObject, SearchableModelObject, SearchItem, org.kohsuke.stapler.StaplerProxy
Enclosing class:
PluginManager

@Extension @Symbol("pluginUpdate") public static final class PluginManager.PluginUpdateMonitor extends AdministrativeMonitor
AdministrativeMonitor that informs the administrator about a required plugin update.
Since:
1.491
  • Constructor Details

    • PluginUpdateMonitor

      public PluginUpdateMonitor()
  • Method Details

    • getInstance

      public static PluginManager.PluginUpdateMonitor getInstance()
      Convenience method to ease access to this monitor, this allows other plugins to register required updates.
      Returns:
      this monitor.
    • ifPluginOlderThenReport

      public void ifPluginOlderThenReport(String pluginName, String requiredVersion, String message)
      Report to the administrator if the plugin with the given name is older then the required version.
      Parameters:
      pluginName - shortName of the plugin (artifactId)
      requiredVersion - the lowest version which is OK (e.g. 2.2.2)
      message - the message to show (plain text)
    • isActivated

      public boolean isActivated()
      Description copied from class: AdministrativeMonitor
      Returns true if this monitor is activated and wants to produce a warning message.

      This method is called from the HTML rendering thread, so it should run efficiently.

      Specified by:
      isActivated in class AdministrativeMonitor
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface ModelObject
      Overrides:
      getDisplayName in class AdministrativeMonitor
    • addPluginToUpdate

      public void addPluginToUpdate(String pluginName, String message)
      adds a message about a plugin to the manage screen
      Parameters:
      pluginName - the plugins name
      message - the message to be displayed
    • getPluginsToBeUpdated