com.partnersoft.update
Class UpdateLib

java.lang.Object
  extended by com.partnersoft.update.UpdateLib
All Implemented Interfaces:
Lib, UpdateConstants

public class UpdateLib
extends java.lang.Object
implements UpdateConstants, Lib

Useful methods for dealing with the update system.

Author:
Paul Reavis Copyright 2005 Partner Software, Inc.

Field Summary
 
Fields inherited from interface com.partnersoft.update.UpdateConstants
CENTRAL_HUB, CONFIG_LEVELS, DISTRIBUTION, INSTALL_TYPES, MAP_TRANSLATOR, MASTER_INSTALL, OS, OS_DIRS, PALM_USER, PROVIDER, SHORT_INSTALL_TYPES, SITE_HUB, USER, WEB_USER
 
Method Summary
static java.lang.String boxcarPathFor(java.lang.String packageName)
           
static void buildInstalledPackagesFile()
          Builds and writes the update/info/InstalledPackages.txt manifest file.
static java.lang.String checksumPathFor(java.lang.String packageName)
           
static java.util.ArrayList contentsForPackage(java.lang.String packageName)
           
static Naming getPackageContents()
           
static java.util.ArrayList listPackagesChanged()
           
static java.util.ArrayList listPackagesChanged(java.net.URL source, Vfs destination)
           
static java.util.ArrayList listPackagesChanged(Vfs source, Vfs destination)
           
static void makeAbsolutelySureItAintA3xInstall(java.io.File installDir)
           
static java.util.ArrayList packagesProvidedBy(java.lang.String sourceType)
           
static void packMapsPackage(java.lang.String name)
          Packs up just the named maps package.
static void packPackage(java.lang.String packageName)
          Packs up the named package.
static java.lang.String readInstallType(Vfs source)
           
static java.util.List<java.lang.String> readMapPackageList(java.net.URL source)
           
static java.util.List<java.lang.String> readMapPackageList(Vfs source)
           
static java.lang.String readSource()
          Returns the update source URL as a string.
static java.lang.String readSourceInstallType()
           
static void restart()
          Updates the system, then restarts the Map Viewer.
static void unpackMapsPackage(java.lang.String name)
          Unpacks the named maps package.
static void unpackPackage(java.lang.String packageName)
          Unpacks the named package.
static void updateAndRestartHub()
          Updates the system, then restarts the Hub.
static java.util.ArrayList whichPackages(java.lang.String sourceType, java.lang.String destinationType, OS os, boolean embedJava, java.util.List<java.lang.String> mapPackages)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

contentsForPackage

public static java.util.ArrayList contentsForPackage(java.lang.String packageName)

boxcarPathFor

public static java.lang.String boxcarPathFor(java.lang.String packageName)

checksumPathFor

public static java.lang.String checksumPathFor(java.lang.String packageName)

makeAbsolutelySureItAintA3xInstall

public static void makeAbsolutelySureItAintA3xInstall(java.io.File installDir)
                                               throws java.lang.Exception
Throws:
java.lang.Exception

getPackageContents

public static Naming getPackageContents()

whichPackages

public static java.util.ArrayList whichPackages(java.lang.String sourceType,
                                                java.lang.String destinationType,
                                                OS os,
                                                boolean embedJava,
                                                java.util.List<java.lang.String> mapPackages)

packagesProvidedBy

public static java.util.ArrayList packagesProvidedBy(java.lang.String sourceType)

readSource

public static java.lang.String readSource()
                                   throws java.io.IOException
Returns the update source URL as a string.

Returns:
Throws:
java.io.IOException

readSourceInstallType

public static java.lang.String readSourceInstallType()
                                              throws java.io.IOException
Throws:
java.io.IOException

readInstallType

public static java.lang.String readInstallType(Vfs source)
                                        throws java.io.IOException
Throws:
java.io.IOException

readMapPackageList

public static java.util.List<java.lang.String> readMapPackageList(Vfs source)
                                                           throws java.io.IOException
Throws:
java.io.IOException

readMapPackageList

public static java.util.List<java.lang.String> readMapPackageList(java.net.URL source)
                                                           throws java.io.IOException
Throws:
java.io.IOException

listPackagesChanged

public static java.util.ArrayList listPackagesChanged()
                                               throws java.io.IOException
Throws:
java.io.IOException

listPackagesChanged

public static java.util.ArrayList listPackagesChanged(Vfs source,
                                                      Vfs destination)
                                               throws java.io.IOException
Throws:
java.io.IOException

listPackagesChanged

public static java.util.ArrayList listPackagesChanged(java.net.URL source,
                                                      Vfs destination)
                                               throws java.io.IOException
Throws:
java.io.IOException

restart

public static void restart()
                    throws java.io.IOException
Updates the system, then restarts the Map Viewer.

Throws:
java.io.IOException

updateAndRestartHub

public static void updateAndRestartHub()
                                throws java.io.IOException
Updates the system, then restarts the Hub.

Throws:
java.io.IOException

packPackage

public static void packPackage(java.lang.String packageName)
                        throws java.io.IOException
Packs up the named package.

Throws:
java.io.IOException

packMapsPackage

public static void packMapsPackage(java.lang.String name)
                            throws java.io.IOException
Packs up just the named maps package.

Throws:
java.io.IOException

unpackPackage

public static void unpackPackage(java.lang.String packageName)
                          throws java.io.IOException
Unpacks the named package.

Throws:
java.io.IOException

unpackMapsPackage

public static void unpackMapsPackage(java.lang.String name)
                              throws java.io.IOException
Unpacks the named maps package.

Throws:
java.io.IOException

buildInstalledPackagesFile

public static void buildInstalledPackagesFile()
                                       throws java.io.IOException
Builds and writes the update/info/InstalledPackages.txt manifest file.

Throws:
java.io.IOException