Package hudson.model
Class UpdateCenter.InstallationJob
java.lang.Object
hudson.model.UpdateCenter.UpdateCenterJob
hudson.model.UpdateCenter.DownloadJob
hudson.model.UpdateCenter.InstallationJob
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
UpdateCenter.EnableJob
- Enclosing class:
- UpdateCenter
Represents the state of the installation activity of one plugin.
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.UpdateCenter.DownloadJob
UpdateCenter.DownloadJob.Failure, UpdateCenter.DownloadJob.InstallationStatus, UpdateCenter.DownloadJob.Installing, UpdateCenter.DownloadJob.Pending, UpdateCenter.DownloadJob.Skipped, UpdateCenter.DownloadJob.Success, UpdateCenter.DownloadJob.SuccessButRequiresRestart
-
Field Summary
Modifier and TypeFieldDescriptionprotected final boolean
True to load the plugin into this Jenkins, false to wait until restart.final UpdateSite.Plugin
What plugin are we trying to install?protected final PluginManager
Fields inherited from class hudson.model.UpdateCenter.DownloadJob
status
Fields inherited from class hudson.model.UpdateCenter.UpdateCenterJob
error, id, site
-
Constructor Summary
ConstructorDescriptionInstallationJob
(UpdateSite.Plugin plugin, UpdateSite site, Authentication auth, boolean dynamicLoad) Deprecated.InstallationJob
(UpdateSite.Plugin plugin, UpdateSite site, org.springframework.security.core.Authentication auth) Deprecated.as of 1.442InstallationJob
(UpdateSite.Plugin plugin, UpdateSite site, org.springframework.security.core.Authentication auth, boolean dynamicLoad) -
Method Summary
Modifier and TypeMethodDescriptionvoid
_run()
long
Indicate the expected size of the download as provided in update site metadata.protected File
Where to download the file to.Display name used for the GUI.getName()
Code name used for logging.protected URL
getURL()
Where to download the file from.protected void
Called when the whole thing went successfully.protected void
Called when the download is completed to overwrite the old file with the new file.toString()
protected boolean
Indicates there is another installation job for this pluginMethods inherited from class hudson.model.UpdateCenter.DownloadJob
getComputedSHA1, getComputedSHA256, getComputedSHA512, getUser, run
Methods inherited from class hudson.model.UpdateCenter.UpdateCenterJob
getApi, getCorrelationId, getError, getErrorMessage, getType, schedule, setCorrelationId, submit
-
Field Details
-
plugin
What plugin are we trying to install? -
pm
-
dynamicLoad
protected final boolean dynamicLoadTrue to load the plugin into this Jenkins, false to wait until restart.
-
-
Constructor Details
-
InstallationJob
@Deprecated public InstallationJob(UpdateSite.Plugin plugin, UpdateSite site, org.springframework.security.core.Authentication auth) Deprecated.as of 1.442 -
InstallationJob
@Deprecated public InstallationJob(UpdateSite.Plugin plugin, UpdateSite site, Authentication auth, boolean dynamicLoad) -
InstallationJob
public InstallationJob(UpdateSite.Plugin plugin, UpdateSite site, org.springframework.security.core.Authentication auth, boolean dynamicLoad)
-
-
Method Details
-
getURL
Description copied from class:UpdateCenter.DownloadJob
Where to download the file from.- Specified by:
getURL
in classUpdateCenter.DownloadJob
- Throws:
MalformedURLException
-
getDestination
Description copied from class:UpdateCenter.DownloadJob
Where to download the file to.- Specified by:
getDestination
in classUpdateCenter.DownloadJob
-
getName
Description copied from class:UpdateCenter.DownloadJob
Code name used for logging.- Specified by:
getName
in classUpdateCenter.DownloadJob
-
getDisplayName
Description copied from class:UpdateCenter.DownloadJob
Display name used for the GUI.- Overrides:
getDisplayName
in classUpdateCenter.DownloadJob
-
getContentLength
public long getContentLength()Description copied from class:UpdateCenter.DownloadJob
Indicate the expected size of the download as provided in update site metadata.- Overrides:
getContentLength
in classUpdateCenter.DownloadJob
- Returns:
- the expected size, or -1 if unknown.
-
_run
- Overrides:
_run
in classUpdateCenter.DownloadJob
- Throws:
IOException
UpdateCenter.DownloadJob.InstallationStatus
-
wasInstalled
protected boolean wasInstalled()Indicates there is another installation job for this plugin- Since:
- 2.1
-
onSuccess
protected void onSuccess()Description copied from class:UpdateCenter.DownloadJob
Called when the whole thing went successfully.- Specified by:
onSuccess
in classUpdateCenter.DownloadJob
-
toString
-
replace
Called when the download is completed to overwrite the old file with the new file.- Overrides:
replace
in classUpdateCenter.DownloadJob
- Throws:
IOException
-
InstallationJob(UpdateSite.Plugin, UpdateSite, Authentication, boolean)