hudson.model
Class UpdateSite.Plugin

java.lang.Object
  extended by hudson.model.UpdateSite.Entry
      extended by hudson.model.UpdateSite.Plugin
Enclosing class:
UpdateSite

public final class UpdateSite.Plugin
extends UpdateSite.Entry


Field Summary
 String[] categories
          Categories for grouping plugins, taken from labels assigned to wiki page.
 String compatibleSinceVersion
          Optional version # from which this plugin release is configuration-compatible.
 Map<String,String> dependencies
          Dependencies of this plugin.
 String excerpt
          Optional excerpt string.
 String requiredCore
          Version of Jenkins core this plugin was compiled against.
 String title
          Human readable title of the plugin, taken from Wiki page.
 String wiki
          Optional URL to the Wiki page that discusses this plugin.
 
Fields inherited from class hudson.model.UpdateSite.Entry
name, sourceId, url, version
 
Constructor Summary
UpdateSite.Plugin(String sourceId, net.sf.json.JSONObject o)
           
 
Method Summary
 Future<UpdateCenter.UpdateCenterJob> deploy()
           
 Future<UpdateCenter.UpdateCenterJob> deploy(boolean dynamicLoad)
          Schedules the installation of this plugin.
 Future<UpdateCenter.UpdateCenterJob> deployBackup()
          Schedules the downgrade of this plugin.
 org.kohsuke.stapler.HttpResponse doDowngrade()
          Performs the downgrade of the plugin.
 org.kohsuke.stapler.HttpResponse doInstall()
          Making the installation web bound.
 org.kohsuke.stapler.HttpResponse doInstallNow()
           
 String getDisplayName()
           
 PluginWrapper getInstalled()
          If some version of this plugin is currently installed, return PluginWrapper.
 List<UpdateSite.Plugin> getNeededDependencies()
          Returns a list of dependent plugins which need to be installed or upgraded for this plugin to work.
 void install()
          Deprecated. as of 1.326 Use deploy().
 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.
 boolean isForNewerHudson()
           
 
Methods inherited from class hudson.model.UpdateSite.Entry
getApi, isNewerThan
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
public final String[] categories
Categories for grouping plugins, taken from labels assigned to wiki page. Can be null.


dependencies

@Exported
public final Map<String,String> dependencies
Dependencies of this plugin.

Constructor Detail

UpdateSite.Plugin

@DataBoundConstructor
public UpdateSite.Plugin(String sourceId,
                                              net.sf.json.JSONObject o)
Method Detail

getDisplayName

public String getDisplayName()

getInstalled

@Exported
public PluginWrapper getInstalled()
If some version of this plugin is currently installed, return PluginWrapper. Otherwise null.


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()

install

public void install()
Deprecated. as of 1.326 Use deploy().


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. See UpdateCenter.isRestartRequiredForCompletion()

deployBackup

public Future<UpdateCenter.UpdateCenterJob> deployBackup()
Schedules the downgrade of this plugin.


doInstall

public org.kohsuke.stapler.HttpResponse doInstall()
                                           throws IOException
Making 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 IOException
Performs the downgrade of the plugin.

Throws:
IOException


Copyright © 2004-2013. All Rights Reserved.