All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.install.products.UninstallUnit

java.lang.Object
   |
   +----com.sun.install.products.InstallComponent
           |
           +----com.sun.install.products.InstallLeaf
                   |
                   +----com.sun.install.products.UninstallUnit

public class UninstallUnit
extends InstallLeaf
The UninstallUnit is able to write out a wizard archive at runtime.


Constructor Index

 o UninstallUnit()
Create a UninstallUnit.
 o UninstallUnit(String, String)
Create an UninstallUnit that writes the unistall archive into the specified directory.

Method Index

 o addExtraResource(String, String)
Force particular resources to be added to the Uninstall archive.
 o addInitTask(String, Task)
Force particular tasks to be added to the Uninstall archive as Initialization tasks that get run during uninstall archive initialization.
 o addRuntimeResources(Vector)
Add the runtime resources required by this class.
 o addSequence(String, Sequence)
Force a particular Sequence to be added to the Uninstall archive.
 o addServerObject(String, ServerObject)
Force a particular ServerObject to be added to the Uninstall archive.
 o getImage()
Gets the image to use during uninstall.
 o getSize()
Get the size of uninstaller wizard.
 o install(WizardState)
Write out the wizard
 o setImage(String)
Sets the image to use in the uninstaller
 o setSize(Dimension)
Sets size of uninstaller wizard.
 o toString()
Represent this object as a string.
 o uninstall(WizardState)
Uninstalls the uninstaller.

Constructors

 o UninstallUnit
 public UninstallUnit()
Create a UninstallUnit.

 o UninstallUnit
 public UninstallUnit(String uninstallDirKey,
                      String productDirectory)
Create an UninstallUnit that writes the unistall archive into the specified directory.

Parameters:
uninstallDirKey - A WizardState key that references the directory into which the uninstaller should be written.
productDirectory - A WizardState key that references the directory where the product was installed.

Methods

 o addExtraResource
 public void addExtraResource(String section,
                              String name)
Force particular resources to be added to the Uninstall archive.

Parameters:
section - The section that the resource can be found in at runtime
section - The section that the resource can be found in.
name - The name of the resource
 o addServerObject
 public void addServerObject(String name,
                             ServerObject object)
Force a particular ServerObject to be added to the Uninstall archive.

Parameters:
name - The name of the resource
object - The ServerObject to be added.
 o setSize
 public void setSize(Dimension size)
Sets size of uninstaller wizard. If this is not set, it will default to the same size as the installer. If the installer size was not set, it defaults to the default wizard size.

Parameters:
size - The initial size of the uninstaller wizard in GUI mode.
 o getSize
 public Dimension getSize()
Get the size of uninstaller wizard.

Returns:
The size the uninstaller wizard will be, or null if the size has not been set.
 o addSequence
 public void addSequence(String name,
                         Sequence sequence)
Force a particular Sequence to be added to the Uninstall archive.

Parameters:
name - The name of the resource
sequence - The sequece to be added.
 o addInitTask
 public void addInitTask(String name,
                         Task task)
Force particular tasks to be added to the Uninstall archive as Initialization tasks that get run during uninstall archive initialization.

Parameters:
name - The name of the task.
task - The task to install as an initialization task.
 o setImage
 public void setImage(String imageName)
Sets the image to use in the uninstaller

Parameters:
img - The image name, in wizard 'dot' notation (e.g. com.sun.install.myimage)
 o getImage
 public String getImage()
Gets the image to use during uninstall.

Returns:
The image name, in wizard 'dot' notation (e.g. com.sun.install.myimage)
 o uninstall
 public boolean uninstall(WizardState state)
Uninstalls the uninstaller. This will occur when the entire product is uninstalled, or the last of the remaining components of a product is uninstalled.

Parameters:
state - The wizard state.
Returns:
Whether the install was successful or not.
Overrides:
uninstall in class InstallComponent
 o install
 public boolean install(WizardState state)
Write out the wizard

Parameters:
state - The wizard state.
Returns:
Whether the install was successful or not.
Overrides:
install in class InstallComponent
 o toString
 public String toString()
Represent this object as a string.

Returns:
A description of this object.
Overrides:
toString in class InstallComponent
 o addRuntimeResources
 public void addRuntimeResources(Vector resourceVector)
Add the runtime resources required by this class.

Parameters:
resourceVector - The vector containing all of the required resources for this class
Overrides:
addRuntimeResources in class InstallLeaf

All Packages  Class Hierarchy  This Package  Previous  Next  Index