public abstract class UpdateCenter.DownloadJob extends UpdateCenter.UpdateCenterJob
Modifier and Type | Class and Description |
---|---|
class |
UpdateCenter.DownloadJob.Failure
Indicates that the installation of a plugin failed.
|
class |
UpdateCenter.DownloadJob.InstallationStatus
Indicates the status or the result of a plugin installation.
|
class |
UpdateCenter.DownloadJob.Installing
Installation of a plugin is in progress.
|
class |
UpdateCenter.DownloadJob.Pending
Indicates that the plugin is waiting for its turn for installation.
|
class |
UpdateCenter.DownloadJob.Skipped
Indicates that the plugin was successfully installed.
|
class |
UpdateCenter.DownloadJob.Success
Indicates that the plugin was successfully installed.
|
class |
UpdateCenter.DownloadJob.SuccessButRequiresRestart
Indicates that the installation was successful but a restart is needed.
|
Modifier and Type | Field and Description |
---|---|
UpdateCenter.DownloadJob.InstallationStatus |
status
Immutable object representing the current state of this job.
|
error, id, site
Modifier | Constructor and Description |
---|---|
protected |
DownloadJob(UpdateSite site,
org.springframework.security.core.Authentication authentication) |
Modifier and Type | Method and Description |
---|---|
protected void |
_run() |
String |
getComputedSHA1()
During download, an attempt is made to compute the SHA-1 checksum of the file.
|
String |
getComputedSHA256()
Base64 encoded SHA-256 checksum of the downloaded file, if it could be computed.
|
String |
getComputedSHA512()
Base64 encoded SHA-512 checksum of the downloaded file, if it could be computed.
|
protected abstract File |
getDestination()
Where to download the file to.
|
String |
getDisplayName()
Display name used for the GUI.
|
abstract String |
getName()
Code name used for logging.
|
protected abstract URL |
getURL()
Where to download the file from.
|
org.springframework.security.core.Authentication |
getUser()
Get the user that initiated this job
|
protected abstract void |
onSuccess()
Called when the whole thing went successfully.
|
protected void |
replace(File dst,
File src)
Called when the download is completed to overwrite
the old file with the new file.
|
void |
run() |
getApi, getCorrelationId, getError, getErrorMessage, getType, schedule, setCorrelationId, submit
@Exported(inline=true) public volatile UpdateCenter.DownloadJob.InstallationStatus status
protected DownloadJob(UpdateSite site, org.springframework.security.core.Authentication authentication)
protected abstract URL getURL() throws MalformedURLException
MalformedURLException
protected abstract File getDestination()
@Exported public abstract String getName()
public String getDisplayName()
protected abstract void onSuccess()
@CheckForNull public String getComputedSHA1()
@CheckForNull public String getComputedSHA256()
@CheckForNull public String getComputedSHA512()
public org.springframework.security.core.Authentication getUser()
protected void _run() throws IOException, UpdateCenter.DownloadJob.InstallationStatus
protected void replace(File dst, File src) throws IOException
IOException
Copyright © 2004–2021. All rights reserved.