Package hudson.model
Class UpdateSite.Plugin
- java.lang.Object
-
- hudson.model.UpdateSite.Entry
-
- hudson.model.UpdateSite.Plugin
-
- Enclosing class:
- UpdateSite
public final class UpdateSite.Plugin extends UpdateSite.Entry
-
-
Field Summary
Fields Modifier and Type Field Description String[]categoriesCategories for grouping plugins, taken from labels assigned to wiki page.StringcompatibleSinceVersionOptional version # from which this plugin release is configuration-compatible.Map<String,String>dependenciesDependencies of this plugin, a name -> version mapping.StringexcerptOptional excerpt string.UpdateSite.IssueTracker[]issueTrackersIssue trackers associated with this plugin.Map<String,String>optionalDependenciesOptional dependencies of this plugin.DoublepopularityPopularity of this plugin.DatereleaseTimestampDate when this plugin was released.StringrequiredCoreVersion of Jenkins core this plugin was compiled against.StringtitleHuman readable title of the plugin, taken from Wiki page.StringwikiOptional URL to the Wiki page that discusses this plugin.-
Fields inherited from class hudson.model.UpdateSite.Entry
name, sourceId, url, version
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Future<UpdateCenter.UpdateCenterJob>deploy()Future<UpdateCenter.UpdateCenterJob>deploy(boolean dynamicLoad)Schedules the installation of this plugin.Future<UpdateCenter.UpdateCenterJob>deploy(boolean dynamicLoad, UUID correlationId, List<PluginWrapper> batch, boolean hasEnabledDependents)Schedules the installation of this plugin.Future<UpdateCenter.UpdateCenterJob>deployBackup()Schedules the downgrade of this plugin.org.kohsuke.stapler.HttpResponsedoDowngrade()Performs the downgrade of the plugin.org.kohsuke.stapler.HttpResponsedoInstall()Making the installation web bound.org.kohsuke.stapler.HttpResponsedoInstallNow()booleanfixesSecurityVulnerabilities()Returns true if and only if this update addressed a currently active security vulnerability.Stream<String>getCategoriesStream()Get categories stream for further search.List<UpdateSite.Plugin>getDependenciesIncompatibleWithInstalledVersion(PluginManager.MetadataCache cache)Get the list of incompatible dependencies (if there are any, as determined by isNeededDependenciesCompatibleWithInstalledVersion)UpdateSite.DeprecationgetDeprecation()StringgetDisplayName()Set<UpdateSite.Plugin>getIncompatibleParentPlugins()PluginWrappergetInstalled()If some version of this plugin is currently installed, returnPluginWrapper.List<UpdateSite.Plugin>getNeededDependencies()Returns a list of dependent plugins which need to be installed or upgraded for this plugin to work.VersionNumbergetNeededDependenciesRequiredCore()Set<UpdateSite.Warning>getWarnings()booleanhasCategory(String category)Checks whether a plugin has a desired categorybooleanhasIncompatibleParentPlugins()booleanhasWarnings()voidinstall()Deprecated.as of 1.326 Usedeploy().booleanisCompatible()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.booleanisCompatible(PluginManager.MetadataCache cache)booleanisCompatibleWithInstalledVersion()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.booleanisDeprecated()booleanisForNewerHudson()booleanisNeededDependenciesCompatibleWithInstalledVersion()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.booleanisNeededDependenciesCompatibleWithInstalledVersion(PluginManager.MetadataCache cache)booleanisNeededDependenciesForNewerJenkins()booleanisNeededDependenciesForNewerJenkins(PluginManager.MetadataCache cache)voidsetIncompatibleParentPlugins(Set<UpdateSite.Plugin> incompatibleParentPlugins)-
Methods inherited from class hudson.model.UpdateSite.Entry
getApi, getFileSize, getSha1, getSha256, getSha512, isNewerThan
-
-
-
-
Field Detail
-
wiki
@Exported public final String wiki
Optional URL to the Wiki page that discusses this plugin.
-
title
@Exported public final String 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
@Exported public final String excerpt
Optional excerpt string.
-
compatibleSinceVersion
@Exported public final String compatibleSinceVersion
Optional version # from which this plugin release is configuration-compatible.
-
requiredCore
@Exported public final String requiredCore
Version of Jenkins core this plugin was compiled against.
-
categories
@Exported @CheckForNull public final String[] categories
Categories for grouping plugins, taken from labels assigned to wiki page. Can benullif the update center does not return categories.
-
dependencies
@Exported public final Map<String,String> dependencies
Dependencies of this plugin, a name -> version mapping.
-
optionalDependencies
@Exported public final Map<String,String> optionalDependencies
Optional dependencies of this plugin.
-
releaseTimestamp
@Exported public final Date releaseTimestamp
Date when this plugin was released.- Since:
- 2.224
-
popularity
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public final Double popularity
Popularity of this plugin.- Since:
- 2.233
-
issueTrackers
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public UpdateSite.IssueTracker[] issueTrackers
Issue 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 Detail
-
Plugin
@DataBoundConstructor public Plugin(String sourceId, net.sf.json.JSONObject o)
-
-
Method Detail
-
isDeprecated
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isDeprecated()
-
getDeprecation
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public UpdateSite.Deprecation getDeprecation()
-
getDisplayName
public String getDisplayName()
-
getInstalled
@Exported public PluginWrapper 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
@Exported public List<UpdateSite.Plugin> getNeededDependencies()
Returns a list of dependent plugins which need to be installed or upgraded for this plugin to work.
-
isForNewerHudson
public boolean isForNewerHudson()
-
getNeededDependenciesRequiredCore
public VersionNumber 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
public void setIncompatibleParentPlugins(Set<UpdateSite.Plugin> incompatibleParentPlugins)
-
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
public boolean hasCategory(String category)
Checks whether a plugin has a desired category- Since:
- 2.272
-
getCategoriesStream
public Stream<String> 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 public void install()
Deprecated.as of 1.326 Usedeploy().
-
deploy
public Future<UpdateCenter.UpdateCenterJob> deploy()
-
deploy
public Future<UpdateCenter.UpdateCenterJob> deploy(boolean dynamicLoad)
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
public Future<UpdateCenter.UpdateCenterJob> deployBackup()
Schedules the downgrade of this plugin.
-
doInstall
public org.kohsuke.stapler.HttpResponse doInstall() throws IOExceptionMaking the installation web bound.- Throws:
IOException
-
doInstallNow
public org.kohsuke.stapler.HttpResponse doInstallNow() throws IOException- Throws:
IOException
-
doDowngrade
public org.kohsuke.stapler.HttpResponse doDowngrade() throws IOExceptionPerforms the downgrade of the plugin.- Throws:
IOException
-
-