com.compomics.software.autoupdater
Class DownloadLatestZipFromRepo

java.lang.Object
  extended by com.compomics.software.autoupdater.DownloadLatestZipFromRepo

public class DownloadLatestZipFromRepo
extends Object

Author:
Davy

Constructor Summary
DownloadLatestZipFromRepo()
           
 
Method Summary
static void downloadLatestZipFromRepo(URL jarPath)
          downloads the latest deploy from the genesis maven repository of the artifact of the jarPath,starts it without arguments and removes the old jar if there was an update
static void downloadLatestZipFromRepo(URL jarPath, boolean deleteOldFiles, boolean startDownloadedVersion)
          downloads the latest deploy from the genesis maven repository of the artifact and starts it without arguments
static void downloadLatestZipFromRepo(URL jarPath, boolean deleteOldFiles, String[] args, boolean startDownloadedVersion)
          downloads the latest zip archive of the jar in the url from the genesis maven repo
static void downloadLatestZipFromRepo(URL jarPath, boolean deleteOldFiles, String[] args, URL jarRepository)
          downloads the latest zip archive of the jar in the url from a given jarRepository
static void downloadLatestZipFromRepo(URL jarPath, boolean deleteOldFiles, String iconName, String[] args, URL jarRepository, boolean startDownloadedVersion)
          retrieves the latest version of a maven jar file from a maven repository
static void downloadLatestZipFromRepo(URL jarPath, boolean deleteOldFiles, String iconName, String[] args, URL jarRepository, boolean startDownloadedVersion, FileDAO fileDAO)
          retrieves the latest version of a maven jar file from a maven repository
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DownloadLatestZipFromRepo

public DownloadLatestZipFromRepo()
Method Detail

main

public static void main(String[] args)

downloadLatestZipFromRepo

public static void downloadLatestZipFromRepo(URL jarPath)
                                      throws IOException,
                                             javax.xml.stream.XMLStreamException,
                                             URISyntaxException
downloads the latest deploy from the genesis maven repository of the artifact of the jarPath,starts it without arguments and removes the old jar if there was an update

Parameters:
jarPath - the path to the jarfile
Throws:
IOException - should there be problems with reading or writing files during the updating
javax.xml.stream.XMLStreamException - if there was a problem reading the meta data from the remote maven repository
URISyntaxException

downloadLatestZipFromRepo

public static void downloadLatestZipFromRepo(URL jarPath,
                                             boolean deleteOldFiles,
                                             boolean startDownloadedVersion)
                                      throws IOException,
                                             javax.xml.stream.XMLStreamException,
                                             URISyntaxException
downloads the latest deploy from the genesis maven repository of the artifact and starts it without arguments

Parameters:
jarPath - the path to the jarfile
deleteOldFiles - if the jar who starts the update should be deleted
startDownloadedVersion - if the newly downloaded jar should be started after download
Throws:
IOException - should there be problems with reading or writing files during the updating
javax.xml.stream.XMLStreamException - if there was a problem reading the meta data from the remote maven repository
URISyntaxException

downloadLatestZipFromRepo

public static void downloadLatestZipFromRepo(URL jarPath,
                                             boolean deleteOldFiles,
                                             String[] args,
                                             boolean startDownloadedVersion)
                                      throws IOException,
                                             javax.xml.stream.XMLStreamException,
                                             URISyntaxException
downloads the latest zip archive of the jar in the url from the genesis maven repo

Parameters:
jarPath - the path to the jarfile to update
deleteOldFiles - if the original jar file should be deleted
args - the args for the newly downloaded jar when it starts
Throws:
IOException - should there be problems with reading or writing files during the updating
javax.xml.stream.XMLStreamException - if there was a problem reading the meta data from the remote maven repository
URISyntaxException

downloadLatestZipFromRepo

public static void downloadLatestZipFromRepo(URL jarPath,
                                             boolean deleteOldFiles,
                                             String[] args,
                                             URL jarRepository)
                                      throws IOException,
                                             javax.xml.stream.XMLStreamException,
                                             URISyntaxException
downloads the latest zip archive of the jar in the url from a given jarRepository

Parameters:
jarPath - the path to the jarfile to update, cannot be null
deleteOldFiles - if the original jar folder should be deleted, cannot be null
args - the args for the newly downloaded jar when it starts
jarRepository - the repository to look for the latest deploy of the jar file, cannot be null
Throws:
IOException - should there be problems with reading or writing files during the updating
javax.xml.stream.XMLStreamException - if there was a problem reading the meta data from the remote maven repository
URISyntaxException

downloadLatestZipFromRepo

public static void downloadLatestZipFromRepo(URL jarPath,
                                             boolean deleteOldFiles,
                                             String iconName,
                                             String[] args,
                                             URL jarRepository,
                                             boolean startDownloadedVersion)
                                      throws IOException,
                                             javax.xml.stream.XMLStreamException,
                                             URISyntaxException
retrieves the latest version of a maven jar file from a maven repository

Parameters:
jarPath - the URL of the location of the jar that needs to be updated on the file system. cannot be null
deleteOldFiles - should the old installation be removed or not cannot be null
iconName - name of the shortcut image should one be created
args - the args that will be passed to the newly downloaded program when started, cannot be null
jarRepository - the maven repository to go look in, cannot be null
startDownloadedVersion - if the newly downloaded version should be started automatically or not
Throws:
IOException - should there be problems with reading or writing files during the updating
javax.xml.stream.XMLStreamException - if there was a problem reading the meta data from the remote maven repository
URISyntaxException

downloadLatestZipFromRepo

public static void downloadLatestZipFromRepo(URL jarPath,
                                             boolean deleteOldFiles,
                                             String iconName,
                                             String[] args,
                                             URL jarRepository,
                                             boolean startDownloadedVersion,
                                             FileDAO fileDAO)
                                      throws IOException,
                                             javax.xml.stream.XMLStreamException,
                                             URISyntaxException
retrieves the latest version of a maven jar file from a maven repository

Parameters:
jarPath - the URL of the location of the jar that needs to be updated on the file system. cannot be null
deleteOldFiles - should the old installation be removed or not cannot be null
iconName - name of the shortcut image should one be created
args - the args that will be passed to the newly downloaded program when started, cannot be null
jarRepository - the maven repository to go look in, cannot be null
startDownloadedVersion - if the newly downloaded version should be started automatically or not
fileDAO - what implementation of FileDAO should be used in the updating
Throws:
IOException - should there be problems with reading or writing files during the updating
javax.xml.stream.XMLStreamException - if there was a problem reading the meta data from the remote maven repository
URISyntaxException


Copyright © 2013. All Rights Reserved.