Package hudson
Class PluginManager.PluginUpdateMonitor
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.AdministrativeMonitor
-
- hudson.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PluginManager.PluginUpdateMonitor.PluginUpdateInfo
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from class hudson.model.AdministrativeMonitor
id
-
-
Constructor Summary
Constructors Constructor Description PluginUpdateMonitor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPluginToUpdate(String pluginName, String message)
adds a message about a plugin to the manage screenString
getDisplayName()
static PluginManager.PluginUpdateMonitor
getInstance()
Convenience method to ease access to this monitor, this allows other plugins to register required updates.Collection<PluginManager.PluginUpdateMonitor.PluginUpdateInfo>
getPluginsToBeUpdated()
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.boolean
isActivated()
Returns true if this monitor is activated and wants to produce a warning message.-
Methods inherited from class hudson.model.AdministrativeMonitor
all, disable, doDisable, getRequiredPermission, getSearchUrl, getTarget, getUrl, isEnabled, isSecurity
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
-
-
-
Method Detail
-
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 classAdministrativeMonitor
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceModelObject
- Overrides:
getDisplayName
in classAdministrativeMonitor
-
addPluginToUpdate
public void addPluginToUpdate(String pluginName, String message)
adds a message about a plugin to the manage screen- Parameters:
pluginName
- the plugins namemessage
- the message to be displayed
-
getPluginsToBeUpdated
public Collection<PluginManager.PluginUpdateMonitor.PluginUpdateInfo> getPluginsToBeUpdated()
-
-