osdep
Class WebDownloader

java.lang.Object
  extended by osdep.WebDownloader

public class WebDownloader
extends java.lang.Object

The main class of the library. Downloads a list file containing links to the versions of the required library/application for many platforms. Selects the right version for this platform automatically or, if this did not work, asking the user to choose. Downloads the required library/application and unzips it

Author:
SHZ Mar 6, 2008

Constructor Summary
WebDownloader(IProxySource proxySource, IProxyAuthenticationSource authenticationSource, IConfigurationChooser externalConfigurationChooser, ISiteChooser siteChooser, IDownloadListener listener, ISystemProperties systemProperties)
          Constructor for WebDownloader
 
Method Summary
 void download(java.lang.String listURL, java.lang.String zipPath, java.lang.String finalPath)
          Downloads the library/application
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebDownloader

public WebDownloader(IProxySource proxySource,
                     IProxyAuthenticationSource authenticationSource,
                     IConfigurationChooser externalConfigurationChooser,
                     ISiteChooser siteChooser,
                     IDownloadListener listener,
                     ISystemProperties systemProperties)
Constructor for WebDownloader

Parameters:
proxySource - to get the configuration of the proxy server to which to connect to. If no proxy is needed, proxySource.needsProxy() must return false
authenticationSource - to get the authentication data to use for the proxy If no authentication is needed, authenticationSource.needsProxyAuthentication() must return false If no proxy is needed, authenticationSource is not used
externalConfigurationChooser - to choose the configuration if the automatic chooser failed.
siteChooser - to choose the site where to download the zip file from
listener - Listens to the events of the downloading processes (for the list file and the library/application zip file). Useful to log these processes
systemProperties - the source of the properties defining the platform (os and architecture)
Method Detail

download

public void download(java.lang.String listURL,
                     java.lang.String zipPath,
                     java.lang.String finalPath)
              throws DownloadException
Downloads the library/application

Parameters:
listURL - the URL where to find the list file describing all the configurations
zipPath - the local path where to save the library zip file
finalPath - the local path where to write the files extracted from the library zip file
Throws:
DownloadException