com.soasta.jenkins
Class CommonInstaller

java.lang.Object
  extended by hudson.tools.ToolInstaller
      extended by hudson.tools.DownloadFromUrlInstaller
          extended by com.soasta.jenkins.CommonInstaller
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tools.ToolInstaller>
Direct Known Subclasses:
iOSAppInstallerInstaller, MakeAppTouchTestableInstaller, SCommandInstaller

public class CommonInstaller
extends hudson.tools.DownloadFromUrlInstaller

END (Jenkins User-Agent change related imports)


Nested Class Summary
 
Nested classes/interfaces inherited from class hudson.tools.DownloadFromUrlInstaller
hudson.tools.DownloadFromUrlInstaller.DescriptorImpl<T extends hudson.tools.DownloadFromUrlInstaller>, hudson.tools.DownloadFromUrlInstaller.Installable, hudson.tools.DownloadFromUrlInstaller.InstallableList
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.tools.DownloadFromUrlInstaller
id
 
Fields inherited from class hudson.tools.ToolInstaller
tool
 
Method Summary
 hudson.FilePath performInstallation(hudson.tools.ToolInstallation tool, hudson.model.Node node, hudson.model.TaskListener log)
          The following code changes the file download request for installer files (iOSAppInstaller, MATT, or SCommand) to have a User-Agent of "Jenkins/" instead of "Java/".
 
Methods inherited from class hudson.tools.DownloadFromUrlInstaller
findPullUpDirectory, getInstallable, isUpToDate
 
Methods inherited from class hudson.tools.ToolInstaller
appliesTo, getDescriptor, getLabel, preferredLocation, setTool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

performInstallation

public hudson.FilePath performInstallation(hudson.tools.ToolInstallation tool,
                                           hudson.model.Node node,
                                           hudson.model.TaskListener log)
                                    throws IOException,
                                           InterruptedException
The following code changes the file download request for installer files (iOSAppInstaller, MATT, or SCommand) to have a User-Agent of "Jenkins/" instead of "Java/". This allow this call to correctly identify itself as coming from the Jenkins plugin. WARNING: This code was taken from Jenkins (1.544) src, FilePath.java and DownloadFromUrlInstaller.java. A few changes were made to logging and to make the code work. May be vulnerable to Jenkins base code changes in the future. Issues related to this may crop up in the future concerning any type of installer downloading because of this. This addition is because of Bug 71924. TODO: Remove code when Jenkins will properly identify itself in the User-Agent. All the code below is tied to being able to add to the URLConnection that the User-Agent is, instead, "Jenkins/..." and not "Java/...".

Overrides:
performInstallation in class hudson.tools.DownloadFromUrlInstaller
Throws:
IOException
InterruptedException


Copyright © 2004-2014. All Rights Reserved.