Package hudson.model
Class UpdateSite.Plugin
java.lang.Object
hudson.model.UpdateSite.Entry
hudson.model.UpdateSite.Plugin
- Enclosing class:
- UpdateSite
-
Field Summary
Modifier and TypeFieldDescriptionfinal String[]
Categories for grouping plugins, taken from labels assigned to wiki page.final String
Optional version # from which this plugin release is configuration-compatible.Dependencies of this plugin, a name -> version mapping.final String
Optional excerpt string.Issue trackers associated with this plugin.Optional dependencies of this plugin.final Double
Popularity of this plugin.final Date
Date when this plugin was released.final String
Version of Jenkins core this plugin was compiled against.final String
Human readable title of the plugin, taken from Wiki page.final String
Optional URL to the Wiki page that discusses this plugin.Fields inherited from class hudson.model.UpdateSite.Entry
name, sourceId, url, version
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeploy()
deploy
(boolean dynamicLoad) Schedules the installation of this plugin.deploy
(boolean dynamicLoad, UUID correlationId, List<PluginWrapper> batch, boolean hasEnabledDependents) Schedules the installation of this plugin.Schedules the downgrade of this plugin.org.kohsuke.stapler.HttpResponse
Performs the downgrade of the plugin.org.kohsuke.stapler.HttpResponse
Making the installation web bound.org.kohsuke.stapler.HttpResponse
boolean
Returns true if and only if this update addressed a currently active security vulnerability.Get categories stream for further search.Get the list of incompatible dependencies (if there are any, as determined by isNeededDependenciesCompatibleWithInstalledVersion)If some version of this plugin is currently installed, returnPluginWrapper
.Returns a list of dependent plugins which need to be installed or upgraded for this plugin to work.boolean
hasCategory
(String category) Checks whether a plugin has a desired categoryboolean
boolean
void
install()
Deprecated.boolean
Returns true if the plugin and its dependencies are fully compatible with the current installation This is set to restricted for now, since it is only being used by Jenkins UI or Restful API at the moment.boolean
boolean
If the plugin is already installed, and the new version of the plugin has a "compatibleSinceVersion" value (i.e., it's only directly compatible with that version or later), this will check to see if the installed version is older than the compatible-since version.boolean
boolean
boolean
If at least some of the plugin's needed dependencies are already installed, and the new version of the needed dependencies plugin have a "compatibleSinceVersion" value (i.e., it's only directly compatible with that version or later), this will check to see if the installed version is older than the compatible-since version.boolean
boolean
boolean
void
setIncompatibleParentPlugins
(Set<UpdateSite.Plugin> incompatibleParentPlugins) Methods inherited from class hudson.model.UpdateSite.Entry
getApi, getFileSize, getSha1, getSha256, getSha512, isNewerThan
-
Field Details
-
wiki
Optional URL to the Wiki page that discusses this plugin. -
title
Human readable title of the plugin, taken from Wiki page. Can be null.beware of XSS vulnerability since this data comes from Wiki
-
excerpt
Optional excerpt string. -
compatibleSinceVersion
Optional version # from which this plugin release is configuration-compatible. -
requiredCore
Version of Jenkins core this plugin was compiled against. -
categories
Categories for grouping plugins, taken from labels assigned to wiki page. Can benull
if the update center does not return categories. -
dependencies
Dependencies of this plugin, a name -> version mapping. -
optionalDependencies
Optional dependencies of this plugin. -
releaseTimestamp
Date when this plugin was released.- Since:
- 2.224
-
popularity
Popularity of this plugin.- Since:
- 2.233
-
issueTrackers
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public UpdateSite.IssueTracker[] issueTrackersIssue trackers associated with this plugin. This list is sorted by preference in descending order, meaning a UI supporting only one issue tracker should reference the first one supporting the desired behavior (like having areportUrl
).
-
-
Constructor Details
-
Plugin
-
-
Method Details
-
isDeprecated
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isDeprecated() -
getDeprecation
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public UpdateSite.Deprecation getDeprecation() -
getDisplayName
-
getInstalled
If some version of this plugin is currently installed, returnPluginWrapper
. Otherwise null. -
isCompatible
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @Exported public boolean isCompatible()Returns true if the plugin and its dependencies are fully compatible with the current installation This is set to restricted for now, since it is only being used by Jenkins UI or Restful API at the moment.- Since:
- 2.175
-
isCompatible
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isCompatible(PluginManager.MetadataCache cache) -
isCompatibleWithInstalledVersion
@Exported public boolean isCompatibleWithInstalledVersion()If the plugin is already installed, and the new version of the plugin has a "compatibleSinceVersion" value (i.e., it's only directly compatible with that version or later), this will check to see if the installed version is older than the compatible-since version. If it is older, it'll return false. If it's not older, or it's not installed, or it's installed but there's no compatibleSinceVersion specified, it'll return true. -
getNeededDependencies
Returns a list of dependent plugins which need to be installed or upgraded for this plugin to work. -
isForNewerHudson
public boolean isForNewerHudson() -
getNeededDependenciesRequiredCore
-
isNeededDependenciesForNewerJenkins
public boolean isNeededDependenciesForNewerJenkins() -
isNeededDependenciesForNewerJenkins
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isNeededDependenciesForNewerJenkins(PluginManager.MetadataCache cache) -
isNeededDependenciesCompatibleWithInstalledVersion
public boolean isNeededDependenciesCompatibleWithInstalledVersion()If at least some of the plugin's needed dependencies are already installed, and the new version of the needed dependencies plugin have a "compatibleSinceVersion" value (i.e., it's only directly compatible with that version or later), this will check to see if the installed version is older than the compatible-since version. If it is older, it'll return false. If it's not older, or it's not installed, or it's installed but there's no compatibleSinceVersion specified, it'll return true. -
isNeededDependenciesCompatibleWithInstalledVersion
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isNeededDependenciesCompatibleWithInstalledVersion(PluginManager.MetadataCache cache) -
fixesSecurityVulnerabilities
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean fixesSecurityVulnerabilities()Returns true if and only if this update addressed a currently active security vulnerability.- Returns:
- true if and only if this update addressed a currently active security vulnerability.
-
getDependenciesIncompatibleWithInstalledVersion
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public List<UpdateSite.Plugin> getDependenciesIncompatibleWithInstalledVersion(PluginManager.MetadataCache cache) Get the list of incompatible dependencies (if there are any, as determined by isNeededDependenciesCompatibleWithInstalledVersion)- Since:
- 2.203
-
setIncompatibleParentPlugins
-
getIncompatibleParentPlugins
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Set<UpdateSite.Plugin> getIncompatibleParentPlugins() -
hasIncompatibleParentPlugins
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean hasIncompatibleParentPlugins() -
getWarnings
@CheckForNull @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Set<UpdateSite.Warning> getWarnings()- Since:
- 2.40
-
hasCategory
Checks whether a plugin has a desired category- Since:
- 2.272
-
getCategoriesStream
Get categories stream for further search.- Since:
- 2.272
-
hasWarnings
@Restricted(org.kohsuke.accmod.restrictions.DoNotUse.class) public boolean hasWarnings()- Since:
- 2.40
-
install
Deprecated.as of 1.326 Usedeploy()
. -
deploy
-
deploy
Schedules the installation of this plugin.This is mainly intended to be called from the UI. The actual installation work happens asynchronously in another thread.
- Parameters:
dynamicLoad
- If true, the plugin will be dynamically loaded into this Jenkins. If false, the plugin will only take effect after the reboot. SeeUpdateCenter.isRestartRequiredForCompletion()
-
deploy
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Future<UpdateCenter.UpdateCenterJob> deploy(boolean dynamicLoad, @CheckForNull UUID correlationId, @CheckForNull List<PluginWrapper> batch, boolean hasEnabledDependents) Schedules the installation of this plugin.This is mainly intended to be called from the UI. The actual installation work happens asynchronously in another thread.
- Parameters:
dynamicLoad
- If true, the plugin will be dynamically loaded into this Jenkins. If false, the plugin will only take effect after the reboot. SeeUpdateCenter.isRestartRequiredForCompletion()
correlationId
- A correlation ID to be set on the job.batch
- if defined, a list of plugins to add to, which will be started laterhasEnabledDependents
- If true, this plugin will be enabled if this plugin is disabled. If false, this plugin will remain the current status.
-
deployBackup
Schedules the downgrade of this plugin. -
doInstall
Making the installation web bound.- Throws:
IOException
-
doInstallNow
- Throws:
IOException
-
doDowngrade
Performs the downgrade of the plugin.- Throws:
IOException
-
deploy()
.