|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.model.UpdateSite
@ExportedBean public class UpdateSite
Source of the update center information, like "http://jenkins-ci.org/update-center.json"
Jenkins can have multiple UpdateSite
s registered in the system, so that it can pick up plugins
from different locations.
Nested Class Summary | |
---|---|
class |
UpdateSite.Data
In-memory representation of the update center data. |
static class |
UpdateSite.Entry
|
class |
UpdateSite.Plugin
|
Field Summary | |
---|---|
static boolean |
neverUpdate
|
Constructor Summary | |
---|---|
UpdateSite(String id,
String url)
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean neverUpdate
Constructor Detail |
---|
public UpdateSite(String id, String url)
Method Detail |
---|
@Exported public String getId()
@Exported public long getDataTimestamp()
public Future<FormValidation> updateDirectly(boolean signatureCheck)
postMessage
, not raw JSON.
signatureCheck
- whether to enforce the signature (may be off only for testing!)
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |