@ExportedBean public class UpdateSite extends Object
Jenkins can have multiple UpdateSite
s registered in the system, so that it can pick up plugins
from different locations.
Modifier and Type | Class and Description |
---|---|
class |
UpdateSite.Data
In-memory representation of the update center data.
|
static class |
UpdateSite.Entry |
class |
UpdateSite.Plugin |
Modifier and Type | Field and Description |
---|---|
static boolean |
neverUpdate |
Constructor and Description |
---|
UpdateSite(String id,
String url) |
Modifier and Type | Method and Description |
---|---|
org.kohsuke.stapler.HttpResponse |
doInvalidateData()
Invalidates the cached data and force retrieval.
|
FormValidation |
doPostBack(org.kohsuke.stapler.StaplerRequest req)
This is the endpoint that receives the update center data file from the browser.
|
FormValidation |
doVerifySignature() |
Api |
getApi() |
List<UpdateSite.Plugin> |
getAvailables()
Returns a list of plugins that should be shown in the "available" tab.
|
String |
getConnectionCheckUrl()
Returns an "always up" server for Internet connectivity testing, or null if we are going to skip the test.
|
UpdateSite.Data |
getData()
Loads the update center data, if any and if modified since last read.
|
long |
getDataTimestamp() |
String |
getDownloadUrl()
Deprecated.
Exposed only for UI.
|
String |
getId()
Get ID string.
|
net.sf.json.JSONObject |
getJSONObject()
Gets the raw update center JSON data.
|
UpdateSite.Plugin |
getPlugin(String artifactId)
Gets the information about a specific plugin.
|
List<UpdateSite.Plugin> |
getUpdates()
Returns the list of plugins that are updates to currently installed ones.
|
String |
getUrl()
Exposed to get rid of hardcoding of the URL that serves up update-center.json
in Javascript.
|
boolean |
hasUpdates()
Does any of the plugin has updates?
|
boolean |
isDue()
Returns true if it's time for us to check for new version.
|
boolean |
isLegacyDefault()
Is this the legacy default update center site?
|
Future<FormValidation> |
updateDirectly(boolean signatureCheck)
Update the data file from the given URL if the file
does not exist, or is otherwise due for update.
|
FormValidation |
updateDirectlyNow(boolean signatureCheck) |
@Exported public String getId()
@Exported public long getDataTimestamp()
@CheckForNull public Future<FormValidation> updateDirectly(boolean signatureCheck)
postMessage
, not raw JSON.signatureCheck
- whether to enforce the signature (may be off only for testing!)@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) @Nonnull public FormValidation updateDirectlyNow(boolean signatureCheck) throws IOException
IOException
public FormValidation doPostBack(org.kohsuke.stapler.StaplerRequest req) throws IOException, GeneralSecurityException
IOException
GeneralSecurityException
public FormValidation doVerifySignature() throws IOException
IOException
public boolean isDue()
public org.kohsuke.stapler.HttpResponse doInvalidateData()
public UpdateSite.Data getData()
public net.sf.json.JSONObject getJSONObject()
@Exported public List<UpdateSite.Plugin> getAvailables()
public UpdateSite.Plugin getPlugin(String artifactId)
artifactId
- The short name of the plugin. Corresponds to PluginWrapper.getShortName()
.public Api getApi()
@Exported public String getConnectionCheckUrl()
@Exported public List<UpdateSite.Plugin> getUpdates()
@Exported public boolean hasUpdates()
@Exported public String getUrl()
public String getDownloadUrl()
public boolean isLegacyDefault()
Copyright © 2014. All rights reserved.