hudson.plugins.simpleupdatesite
Class SimpleUpdateSite

java.lang.Object
  extended by hudson.model.UpdateSite
      extended by hudson.plugins.simpleupdatesite.SimpleUpdateSite

public class SimpleUpdateSite
extends hudson.model.UpdateSite

UpdateSite extension to hack default UpdateSite behavior

Author:
JunHo Yoon

Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.model.UpdateSite
hudson.model.UpdateSite.Data, hudson.model.UpdateSite.Entry, hudson.model.UpdateSite.Plugin
 
Field Summary
 
Fields inherited from class hudson.model.UpdateSite
neverUpdate, signatureCheck
 
Constructor Summary
SimpleUpdateSite(java.lang.String id)
           
SimpleUpdateSite(java.lang.String id, java.lang.String url)
           
 
Method Summary
 void doPostBack(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, java.lang.String json)
          This is the endpoint that receives the update center data file from the browser.
 hudson.util.TextFile getDataFile()
          This is where we store the update center data.
 java.util.List<hudson.model.UpdateSite.Plugin> getInstalled()
           
protected  SimpleUpdateSitePlugIn getPlugin()
           
 java.util.List<hudson.model.UpdateSite.Plugin> getUpdates()
          Returns the list of plugins that are updates to currently installed ones.
 java.lang.String getUrl()
           
 boolean isLegacyDefault()
           
 boolean isNewerPlugin(java.lang.String newVersion, java.lang.String installedVersion)
           
 
Methods inherited from class hudson.model.UpdateSite
doPostBack, getAvailables, getConnectionCheckUrl, getData, getDataTimestamp, getId, getPlugin, hasUpdates, isDue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleUpdateSite

public SimpleUpdateSite(java.lang.String id)

SimpleUpdateSite

public SimpleUpdateSite(java.lang.String id,
                        java.lang.String url)
Method Detail

getUrl

public java.lang.String getUrl()
Overrides:
getUrl in class hudson.model.UpdateSite

getPlugin

protected SimpleUpdateSitePlugIn getPlugin()

isLegacyDefault

public boolean isLegacyDefault()
Overrides:
isLegacyDefault in class hudson.model.UpdateSite

doPostBack

public void doPostBack(org.kohsuke.stapler.StaplerRequest req,
                       org.kohsuke.stapler.StaplerResponse rsp,
                       @QueryParameter
                       java.lang.String json)
                throws java.io.IOException,
                       java.security.GeneralSecurityException
This is the endpoint that receives the update center data file from the browser.

Throws:
java.io.IOException
java.security.GeneralSecurityException

getDataFile

public hudson.util.TextFile getDataFile()
This is where we store the update center data. Because getDataFile in UpdateSite class is private, the function should be provided in this class.


getInstalled

public java.util.List<hudson.model.UpdateSite.Plugin> getInstalled()

getUpdates

public java.util.List<hudson.model.UpdateSite.Plugin> getUpdates()
Returns the list of plugins that are updates to currently installed ones.

Overrides:
getUpdates in class hudson.model.UpdateSite
Returns:
can be empty but never null.

isNewerPlugin

public boolean isNewerPlugin(java.lang.String newVersion,
                             java.lang.String installedVersion)


Copyright © 2004-2011. All Rights Reserved.