Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ka2ddo.yaac.gui
Class UpgradeLauncher

    java.lang.Object
      org.ka2ddo.yaac.gui.UpgradeLauncher

    public class UpgradeLauncher

extends java.lang.Object

This class provides services to:

- test if the currently running version of YAAC is out-of-date,
- download a new distribution of YAAC, start the upgrader utility, and shut down this instance of YAAC,
- remove the used new distribution file once the new instance is started.

Constructor Summary
`UpgradeLauncher()`

Method Summary
`static void` | `checkForUpdates(boolean interactive)` Check whether a newer release of YAAC and/or the currently used plugins is available, displaying status.
`static boolean` | `downloadNewReleases(java.util.List<Provider> providerList, java.lang.String[] versions, int numNeedsUpgrade, java.lang.String[] pluginDistroName, java.lang.String[] pluginDistroType, boolean useSourceForge)` Download the distributions of the new versions of YAAC and/or the supported plugins in a place expected by the upgrade.jar program.
`static java.io.File` | `getInstallRootDirectory()` Locate the directory where YAAC is installed.
`static void` | `transferToLauncher()` Start up the upgrader.jar program and shut down YAAC to get it out of the way.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UpgradeLauncher

    public UpgradeLauncher()

Method Detail

### checkForUpdates

    public static void checkForUpdates(boolean interactive)

  Check whether a newer release of YAAC and/or the currently used plugins is available, displaying status.

  Parameters:
    `interactive` - boolean true if no-upgrade-needed status should be reported (out-of-date status is always reported)

### getInstallRootDirectory

    public static java.io.File getInstallRootDirectory()

  Locate the directory where YAAC is installed.

  Returns:
    File of the YAAC installation directory

### downloadNewReleases

    public static boolean downloadNewReleases(java.util.List<Provider> providerList,
                                              java.lang.String[] versions,
                                              int numNeedsUpgrade,
                                              java.lang.String[] pluginDistroName,
                                              java.lang.String[] pluginDistroType,
                                              boolean useSourceForge)
                                       throws java.io.IOException

  Download the distributions of the new versions of YAAC and/or the supported plugins in a place expected by the upgrade.jar program.

  Parameters:
    `providerList` - List of Provider objects currently installed in YAAC, providing their currently installed version numbers
    `versions` - String array of versions of available upgrades for the Providers in the providerList in the same order (null version string if not available for upgrade)
    `numNeedsUpgrade` - number of elements in the providerList that are candidates for upgrade (newer versions available)
    `pluginDistroName` - String base name of the distribution file for YAAC or a plugin
    `pluginDistroType` - String file type of the distribution file for YAAC or a plugin
    `useSourceForge` - boolean true if the SourceForge repository should be used as a download source
  Returns:
    boolean true if download succeeded for at least one upgradable file
  Throws:
    `java.io.IOException` - if download could not succeed for some reason

### transferToLauncher

    public static void transferToLauncher()
                                   throws java.io.IOException

  Start up the upgrader.jar program and shut down YAAC to get it out of the way.

  Throws:
    `java.io.IOException` - if upgrade.jar could not be started or YAAC wouldn't shut down

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD