All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.util.install.Installer

java.lang.Object
   |
   +----semper.util.install.Installer

public class Installer
extends Object
implements MenuLaunchable
This class implements the module installer. It provides services for installing and uninstalling third-party modules into SEMPER. It also provides a menu-launchable Installer application that makes use of these services.

The "distribution" of the module must be available in a separate directory. The directory should contain:

For interactive installation, the properties file must be named props.txt.

The installation process consists of the following steps:

The uninstallation process takes similar but opposite steps.

Version:
$Revision: 1.9 $ $Date: 1998/08/20 17:44:08 $
Author:
N. Asokan ([email protected])
See Also:
ModuleInstallerHook, BlockInstallerHook

Constructor Index

 o Installer()

Method Index

 o checkProperties(Properties)
Sanity check a properties file in a distribution
 o getCanonOSName()
Get the canonical name of the OS.
 o getClassRoot()
Get the root of the SEMPER classes.
 o getDLLDir()
Get the pathname of the SEMPER dll directory This pathname is derived from the root of the SEMPER installation
 o getSEMPERRoot()
Get the root of the SEMPER installation.
 o init()
Initialise the Installer
 o install(String, Properties)
Install a module.
 o isInitialised()
Is the installer already initialised?
 o launch()
Implementing the MenuLaunchable interface
 o readProperties(String)
Read the props.txt file from the specified path_name, do the checks for mandatory properties and return the Properties object.
 o uninstall(Properties)
Uninstall a module specified by the properties object

Constructors

 o Installer
 public Installer()

Methods

 o init
 public static void init() throws InstallerException
Initialise the Installer

Throws: InstallerException
if initialisation failed
 o isInitialised
 public static boolean isInitialised()
Is the installer already initialised?

Returns:
true/false
 o launch
 public void launch()
Implementing the MenuLaunchable interface

See Also:
MenuLaunchable
 o install
 public static void install(String path_name,
                            Properties props) throws InstallerException
Install a module.

Parameters:
path_name - where the distribution is to be found
props - the properties file read from the above directory
Throws: InstallerException
when installation fails
 o uninstall
 public static void uninstall(Properties props) throws InstallerException
Uninstall a module specified by the properties object

Parameters:
properties - object that was used during the installation of the module.
  • Uninstall does not remove class directories!
Throws: InstallerException
when uninstallation fails
 o readProperties
 public static Properties readProperties(String path_name) throws InstallerException
Read the props.txt file from the specified path_name, do the checks for mandatory properties and return the Properties object.

Parameters:
path_name - path name of the distribution directory
Returns:
properties object initialised from the distribution properties file
Throws: InstallerException
when the properties file cannot be read.
 o checkProperties
 public static boolean checkProperties(Properties props) throws InstallerException
Sanity check a properties file in a distribution

Parameters:
props - Properties object initialised from a properties file in a module distribution
Returns:
true/false
Throws: InstallerException
when the check cannot be performed
 o getSEMPERRoot
 public static String getSEMPERRoot()
Get the root of the SEMPER installation. The current implementation is only a guess, assuming that the SEMPER classes are in the first directory in the CLASSPATH whose pathname ends with "lib/java/classes". It also assumes that the SEMPER classes are not in a zip file. An alternative implementation may assume that SEMPERPATH is set in the environment by the startup script.

Returns:
string pathname of the SEMPER root
See Also:
getClassRoot, getDLLDir
 o getClassRoot
 public static String getClassRoot()
Get the root of the SEMPER classes. This pathname is derived from the root of the SEMPER installation. This also assumes that SEMPER classes are not in the form of a zip file. Sigh.

Returns:
string pathname of the SEMPER classes directory
See Also:
getSEMPERRoot
 o getDLLDir
 public static String getDLLDir()
Get the pathname of the SEMPER dll directory This pathname is derived from the root of the SEMPER installation

Returns:
string pathname of the SEMPER dll directory
See Also:
getSEMPERRoot
 o getCanonOSName
 public static String getCanonOSName()
Get the canonical name of the OS. SEMPER has its own ideas of how to name operating systems. This method returns the name of the OS according to SEMPER's whims. You are probably better off using the os.name property

Returns:
SEMPER's idea of what the name of the OS is

All Packages  Class Hierarchy  This Package  Previous  Next  Index