All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.install.products.InstallArchiveWriter

java.lang.Object
   |
   +----com.sun.install.products.InstallArchiveWriter

public class InstallArchiveWriter
extends Object
This class can be used to create a basic install with only the product name, and the components of the product (if any). Without supplying any additional information, a basic install with default panels will be created. Customization can be accomplished using the supplied methods. Other methods in ArchiveWriter can be used to further customize the install.

See Also:
ArchiveWriter

Variable Index

 o aboutMsg
The localized text that will appear on the about.. Deprecated.
 o archiveName
This is the name of the resulting wizard archive class. Deprecated.
 o baselineImageName
The name of the baseline image (in Wizard Resource form) to place in the wizard Deprecated.
 o cancelMsg
The text that appears when the user presses the cancel button. Deprecated.
 o CUSTOM_INSTALL
Indicates a wizard which will default to being customized by the user.
 o DEFAULT_INSTALL
Indicates a wizard which will default to installing with its default settings
 o defaultDirectory
The default install directory Deprecated.
 o exitMsg
The text that appears when the user presses the exit button. Deprecated.
 o iconName
The name of the icon image (the image displayed when the wizard is minimized) Deprecated.
 o imageName
The name of the image (in Wizard Resource form) to place in the wizard Deprecated.
 o installResources
The resource list required by the install wizard. Deprecated.
 o installRoot
The root of the client-side install panel tree. Deprecated.
 o installSequence
Sequence used to initialize the product tree, as well as drive it during an install or uninstall. Deprecated.
 o installTypePanel
The (possibly) customized "Install Type" panel Deprecated.
 o NO_INSTALL
Indicates a wizard which will default to not being installed.
 o POST_WELCOME
Used when adding a subtree after the "Welcome" Panel.
 o POSTINSTALL
Used when adding a panel as a pre- or post-configuration panel
 o postinstallnode
A subtree to visit just after installation Deprecated.
 o PRE_VERIFY
Used when adding a subtree to be displayed just before the "Verify" Panel.
 o PREINSTALL
Used when adding a panel as a pre- or post-configuration panel
 o preinstallnode
A subtree to visit just before installation Deprecated.
 o product
The product tree which represents this product and its components Deprecated.
 o productInstallType
Maintains the type of install each child archive should default to (should be same size as selectedChildren list, if not, assumes default install). Deprecated.
 o productName
The name of the product we are installing Deprecated.
 o progressImageName
The image that appears during the actual installation (while the progress bars are advancing). Deprecated.
 o selectedChildren
Maintains a list of any child wizard archives Deprecated.
 o selectedComponentIDs
Maintains a list of any selected components, if we are creating a wizard Deprecated.
 o welcomePanel
The (possibly) customized "Welcome" panel Deprecated.
 o wizardRuntimePath
The path to the Wizard runtime classes. Deprecated.
 o wizardState
This is the wizardState that will be saved in the archive. Deprecated.

Constructor Index

 o InstallArchiveWriter()
Create an InstallArchiveWriter object.

Method Index

 o addCollection(ResourceCollection)
Adds a collection of resources to the archive.
 o addComponent(InstallComponent)
Adds an arbitrary InstallComponent to the top of the product tree.
 o addComponent(InstallComponent, boolean, boolean)
Adds an arbitrary InstallComponent to the top of the product tree.
 o addComponent(Msg, String, String, boolean, boolean, Hashtable)
This method builds the product tree for this product.
 o addConfigurationNode(int, WizardComponent)
Adds a panel subtree as either a pre- or a post-install configuration panel. Deprecated.
 o addInitializationTask(Task)
Adds a task to the initialization sequence for this wizard.
 o addNode(int, WizardComponent)
Adds a panel subtree to a particular place in the install panel sequence.
 o addResource(String, ResourceWriter)
Add a resource to the archive. Deprecated.
 o addWizard(String, int)
Adds a child wizard to this wizard.
 o createClientTree()
Builds the client panel tree.
 o createWizardConnectorTree()
Creates a client tree for a wizard that doesn't install anything itself, it just calls into other wizards and acts as a top-level product installer (a wizard "connector").
 o createWizardTree()
This method is called when it is time to create the client tree for a true wizard (i.e.
 o getArchiveName()
Returns the name of this wizard archive (without the ".class" extension)
 o getBaselineImage()
Gets the name of the baselineImage to be included in this wizard.
 o getConnector()
Whether to build a connector wizard or not.
 o getDefaultDirectory()
Gets the default install directory for this product.
 o getIcon()
Gets the name of the icon to be included in this wizard.
 o getImage()
Gets the name of the image to be included in this wizard.
 o getNames(String, String[])
Returns filename (without paths or extensions) of all files with the specified extensions from the specified path
 o getProductName()
Gets the name of this product
 o getRoot()
Returns the WizardComposite object that is the root of the client tree.
 o getWelcomePanel()
Gets the first panel to be seen during the wizard
 o getWizardRuntimeClasspath()
getWizardRuntimeClasspath looks at the classpath for the wizard class files.
 o getWizardState()
Returns the WizardState object that will be written into the wizard archive.
 o setAboutMsg(Msg)
Set the Msg that will appear in the "About" button on the default WelcomePanel.
 o setArchiveName(String)
Sets the name of this archive, omitting the ".class" extension.
 o setBaselineImage(String)
Sets the baselineImage for this product.
 o setCancelMsg(Msg)
Set the text that will appear when the user clicks the 'cancel' button
 o setConnector(boolean)
Causes this class to build a connector wizard, or hierarchical wizard.
 o setDefaultDirectory(String)
Sets the default install directory of this product.
 o setExitMsg(Msg)
Set the text that will appear when the user clicks the 'exit' button
 o setIcon(String)
Sets the icon for this product.
 o setImage(String)
Sets the image for this wizard.
 o setProduct(Product)
Sets the product (the root of the product tree).
 o setProductName(String)
Sets the name of this product.
 o setProgressImage(String)
Sets the image to be displayed during install (when the files are actually being written).
 o setProgressVisual(ProgressVisual)
Sets the Visual to be displayed during the Progress Panel (installation).
 o setResources()
Adds the resources required by this wizard.
 o setRoot(WizardComposite)
Sets the WizardComposite object that will be the root of the client panel tree.
 o setWelcomePanel(WizardLeaf)
Sets the first panel to be seen during the wizard.
 o setWizardState(WizardState)
Sets the WizardState object that will be written into the wizard archive.
 o writeArchive()
Write the install wizard to disk.

Variables

 o wizardState
 protected WizardState wizardState
Note: wizardState is deprecated. use get/setWizardState()

This is the wizardState that will be saved in the archive.

 o exitMsg
 protected Msg exitMsg
Note: exitMsg is deprecated. use get/setExitMsg()

The text that appears when the user presses the exit button.

 o cancelMsg
 protected Msg cancelMsg
Note: cancelMsg is deprecated. use get/setCancelMsg()

The text that appears when the user presses the cancel button.

 o installRoot
 protected WizardComposite installRoot
Note: installRoot is deprecated.

The root of the client-side install panel tree.

 o installResources
 protected Hashtable installResources
Note: installResources is deprecated.

The resource list required by the install wizard.

 o welcomePanel
 protected WizardLeaf welcomePanel
Note: welcomePanel is deprecated.

The (possibly) customized "Welcome" panel

 o installTypePanel
 protected WizardLeaf installTypePanel
Note: installTypePanel is deprecated.

The (possibly) customized "Install Type" panel

 o preinstallnode
 protected WizardComponent preinstallnode
Note: preinstallnode is deprecated.

A subtree to visit just before installation

 o postinstallnode
 protected WizardComponent postinstallnode
Note: postinstallnode is deprecated.

A subtree to visit just after installation

 o productName
 protected String productName
Note: productName is deprecated.

The name of the product we are installing

 o defaultDirectory
 protected String defaultDirectory
Note: defaultDirectory is deprecated.

The default install directory

 o product
 protected Product product
Note: product is deprecated.

The product tree which represents this product and its components

 o selectedComponentIDs
 protected Vector selectedComponentIDs
Note: selectedComponentIDs is deprecated.

Maintains a list of any selected components, if we are creating a wizard

 o selectedChildren
 protected Vector selectedChildren
Note: selectedChildren is deprecated.

Maintains a list of any child wizard archives

 o productInstallType
 protected Vector productInstallType
Note: productInstallType is deprecated.

Maintains the type of install each child archive should default to (should be same size as selectedChildren list, if not, assumes default install).

 o installSequence
 protected Sequence installSequence
Note: installSequence is deprecated.

Sequence used to initialize the product tree, as well as drive it during an install or uninstall.

 o aboutMsg
 protected Msg aboutMsg
Note: aboutMsg is deprecated.

The localized text that will appear on the about.. button

 o progressImageName
 protected String progressImageName
Note: progressImageName is deprecated.

The image that appears during the actual installation (while the progress bars are advancing). This image is shown above the progress bars.

 o imageName
 protected String imageName
Note: imageName is deprecated. use get/SetImage()

The name of the image (in Wizard Resource form) to place in the wizard

 o baselineImageName
 protected String baselineImageName
Note: baselineImageName is deprecated. use get/setBaselineImage()

The name of the baseline image (in Wizard Resource form) to place in the wizard

 o iconName
 protected String iconName
Note: iconName is deprecated. use get/setIcon()

The name of the icon image (the image displayed when the wizard is minimized)

 o NO_INSTALL
 public static final int NO_INSTALL
Indicates a wizard which will default to not being installed.

 o DEFAULT_INSTALL
 public static final int DEFAULT_INSTALL
Indicates a wizard which will default to installing with its default settings

 o archiveName
 protected String archiveName
Note: archiveName is deprecated. use set/getArchiveName()

This is the name of the resulting wizard archive class.

 o CUSTOM_INSTALL
 public static final int CUSTOM_INSTALL
Indicates a wizard which will default to being customized by the user.

 o PREINSTALL
 public static final int PREINSTALL
Used when adding a panel as a pre- or post-configuration panel

 o POSTINSTALL
 public static final int POSTINSTALL
Used when adding a panel as a pre- or post-configuration panel

 o POST_WELCOME
 public static final int POST_WELCOME
Used when adding a subtree after the "Welcome" Panel.

 o PRE_VERIFY
 public static final int PRE_VERIFY
Used when adding a subtree to be displayed just before the "Verify" Panel.

 o wizardRuntimePath
 protected String wizardRuntimePath
Note: wizardRuntimePath is deprecated. use getWizardRuntimeClasspath()

The path to the Wizard runtime classes.

Constructors

 o InstallArchiveWriter
 public InstallArchiveWriter()
Create an InstallArchiveWriter object.

Methods

 o createClientTree
 protected void createClientTree()
Builds the client panel tree.

 o addCollection
 public void addCollection(ResourceCollection collection)
Adds a collection of resources to the archive.

Parameters:
collection - The ResourceCollection to add. If the resources are found, they are written into their respective sections based on the resource type.
 o setConnector
 public void setConnector(boolean state)
Causes this class to build a connector wizard, or hierarchical wizard. A connector wizard controls other subwizards that are independent of this wizard.

Parameters:
state - Whether to build a connector wizard or not.
 o getConnector
 public boolean getConnector()
Whether to build a connector wizard or not.

Returns:
Whether to build a connector wizard or not.
 o getWizardRuntimeClasspath
 public String getWizardRuntimeClasspath()
getWizardRuntimeClasspath looks at the classpath for the wizard class files.

Returns:
The absolute pathname of the specified class.
 o setWelcomePanel
 public void setWelcomePanel(WizardLeaf welcomePanel)
Sets the first panel to be seen during the wizard.

Parameters:
welcomePanel - The WIzardLeaf to be shown first during the wizard
 o getWelcomePanel
 public WizardLeaf getWelcomePanel()
Gets the first panel to be seen during the wizard

Returns:
The first panel to be seen during the wizard
 o addInitializationTask
 public void addInitializationTask(Task task)
Adds a task to the initialization sequence for this wizard. You can add a task to do any initialization your wizard might need using this method. The task will be run at startup, during the initialization of this wizards.

Parameters:
task - The desired task to be added to the initialization sequence
 o setProductName
 public void setProductName(String name)
Sets the name of this product. If the name is not set, it defaults to "this product".

Parameters:
name - The name of this product
 o getProductName
 public String getProductName()
Gets the name of this product

Returns:
The name of this product.
 o setDefaultDirectory
 public void setDefaultDirectory(String directory)
Sets the default install directory of this product. If this is not set, it defaults to an informative message suggesting what it should be set to.

Parameters:
directory - The name of this product
 o getDefaultDirectory
 public String getDefaultDirectory()
Gets the default install directory for this product.

Returns:
The default install directory.
 o setImage
 public void setImage(String imageName)
Sets the image for this wizard. The image will appear on the left side of the wizard. It should be specified in wizard resource form ([packageName].[imagename_without_extension]). It is recommended that this image be 120 pixels wide x 290 pixels long. Make sure you include your image in the resource collections (by overriding setResources()) or your image will not be included in the archive!

Parameters:
imageName - The name of the image, in wizard resource form.
 o getWizardState
 public WizardState getWizardState()
Returns the WizardState object that will be written into the wizard archive.

Returns:
The WizardState to be written into the wizard archive.
 o setWizardState
 public void setWizardState(WizardState state)
Sets the WizardState object that will be written into the wizard archive.

Parameters:
state - The state to be used to write into the wizard archive
 o getRoot
 public WizardComposite getRoot()
Returns the WizardComposite object that is the root of the client tree.

Returns:
The WizardComposite to be written into the wizard archive, or null if none has been set.
 o setRoot
 public void setRoot(WizardComposite root)
Sets the WizardComposite object that will be the root of the client panel tree. wizard archive.

Parameters:
root - The root of the client panel tree
 o getArchiveName
 public String getArchiveName()
Returns the name of this wizard archive (without the ".class" extension)

Returns:
the name of this wizard archive (without the ".class" extension)
 o setArchiveName
 public void setArchiveName(String archiveName)
Sets the name of this archive, omitting the ".class" extension.

Parameters:
archiveName - The name of this archive
 o getImage
 public String getImage()
Gets the name of the image to be included in this wizard.

Returns:
The name of the image.
 o setIcon
 public void setIcon(String iconName)
Sets the icon for this product. The icon will appear on the left side of the wizard. It should be specified in wizard resource form ([packageName].[imagename_without_extension]) Make sure you include your image in the resource collections (by overriding setResources()) or your image will not be included in the archive!

Parameters:
iconName - The name of the icon, in wizard resource form. It is recommended that this image be 48 pixels square.
 o getIcon
 public String getIcon()
Gets the name of the icon to be included in this wizard.

Returns:
The name of the icon.
 o setBaselineImage
 public void setBaselineImage(String baselineImage)
Sets the baselineImage for this product. The baselineImage will appear below the console image on the left side of the wizard. It should be specified in wizard resource form ([packageName].[imagename_without_extension]). It is recommended that this image be 120 pixels wide x 30 pixels long.Make sure you include your image in the resource collections (by overriding setResources()) or your image will not be included in the archive!

Parameters:
baselineImage - The name of the baselineImage, in wizard resource form.
 o getBaselineImage
 public String getBaselineImage()
Gets the name of the baselineImage to be included in this wizard.

Returns:
The name of the baselineImage.
 o setExitMsg
 public void setExitMsg(Msg exitMsg)
Set the text that will appear when the user clicks the 'exit' button

Parameters:
exitMsg - The localized Msg that should appear when the user presses the "Exit" Button. If no text is supplied via this method, then the wizard will not prompt the user when the exit button is pressed, and simply exit. If text is supplied, it will be localized at runtime Using the correct locale resource bundle, by using the Msg class to produce the desired localized text. locale bundle at runtime.
See Also:
Msg
 o setCancelMsg
 public void setCancelMsg(Msg cancelMsg)
Set the text that will appear when the user clicks the 'cancel' button

Parameters:
cancelMsg - The localized Msg that should appear when the user presses the "Cancel" Button. If no text is supplied via this method, then the wizard will not prompt the user when the cancel button is pressed, and simply cancel whatever it was doing at the time. If text is supplied, it will be localized using the correct runtime locale resource bundle and the supplied key.
See Also:
Msg
 o setAboutMsg
 public void setAboutMsg(Msg aboutMsg)
Set the Msg that will appear in the "About" button on the default WelcomePanel. If the WelcomePanel is not used, this button will not appear.

Parameters:
aboutMsg - The locale-enabled Msg that should appear when the user presses the "About..." Button. If no text is supplied via this method, then the about button will not appear. If text is supplied, it will be locaized at runtime using the correct locale bundle.
 o setProgressImage
 public void setProgressImage(String imageName)
Sets the image to be displayed during install (when the files are actually being written). This image should be specified in wizard resource form (i.e. [package name].[image name without extension]).

Parameters:
imageName - The name of the image, in wizard resource form.
 o setProgressVisual
 public void setProgressVisual(ProgressVisual progressVisual)
Sets the Visual to be displayed during the Progress Panel (installation).

Parameters:
progressVisual - The visual to display
 o addResource
 public void addResource(String name,
                         ResourceWriter writer)
Note: addResource() is deprecated. use new ResourceCollection ResourceResolver classes

Add a resource to the archive. At buildtime, this ResourceWriter will be called upon to write its contents to the archive.

Parameters:
name - The name of the resource.
writer - The object that will write the resource data into the archive.
 o getNames
 public static String[] getNames(String path,
                                 String exts[])
Returns filename (without paths or extensions) of all files with the specified extensions from the specified path

Parameters:
path - The path to the files.
exts - The file extensions to look for.
 o setResources
 protected void setResources()
Adds the resources required by this wizard. This method should be overridden by a subclass to add other resources. However, the subclass should include a call to super.setResources() to gather the resources required by the superclass.

 o addComponent
 public void addComponent(Msg componentName,
                          String componentPath,
                          String componentFile,
                          boolean isDefault,
                          boolean isRequired,
                          Hashtable forcedPermissions)
This method builds the product tree for this product. The product tree is a two-level deep tree in most cases, with a possible 3rd layer for product dependencies.

Parameters:
componentName - The name of the component to add (localized via com.sun.wizards.core.Msg)
componentPath - The path to the directory comprising this component.
componentFile - The file name of this component. This can be a regular file or a directory. The files in this component will be laid down relative to the base directory specified by the user.
isDefault - true, if this component is to be installed during a "default" install. If this component is a required component, this setting will always be set to true.
isRequired - true, if this component should always be installed. The user will not be able to de-select this component.
forcedPermissions - A hashtable consisting of filenames and the desired permissions or null if no forced * permissions should be appliet.. These permissions will override any other permissions for this file at install-time. The filenames should be specified relative the the supplied path parameter.
 o addComponent
 public void addComponent(InstallComponent installComponent)
Adds an arbitrary InstallComponent to the top of the product tree. You can use this to "plug in" an arbitrary subtree into the product tree, including trees with a single component. It will behave as every other component does. You can include arbitrary tree structures, including any dependency components. Any "reportable" components in your subtree will be automatically added as a logical product software component for this wizard, as though you had used the addComponent(String, String) construction. Each component of the subtree will, by default, be marked as *not* required (that is, selectable by the user).

The name of the InstallComponent (i.e. the String returned from getName()) is used as the reported name in the wizard.

Parameters:
installComponent - The root of the subtree you wish to add.
 o setProduct
 public void setProduct(Product product)
Sets the product (the root of the product tree).

Parameters:
product - The product that will be serialized into the archive.
 o addComponent
 public void addComponent(InstallComponent installComponent,
                          boolean isRequired,
                          boolean isDefault)
Adds an arbitrary InstallComponent to the top of the product tree. You can use this to "plug in" an arbitrary subtree into the product tree, including trees with a single component. It will behave as every other component does. You can include arbitrary tree structures, including any dependency components. Any "reportable" components in your subtree will be automatically added as a logical product software component for this wizard, as though you had used the addComponent(String, String) construction. If you specify true for the isRequired argument, every component in the tree will be marked as required.

The non-localized name of the InstallComponent (i.e. the String returned from getName().toString()) is used as the reported name in the wizard.

Parameters:
installComponent - The root of the subtree you wish to add.
isRequired - true, if this component should always be installed. The user will not be able to de-select this component.
isDefault - true, if this component is to be installed during a "default" install. If this component is a required component, this setting will always be set to true.
 o addConfigurationNode
 public void addConfigurationNode(int type,
                                  WizardComponent node)
Note: addConfigurationNode() is deprecated. You should use addNode(int, WizardComponent) with the same arguments.

Adds a panel subtree as either a pre- or a post-install configuration panel. Depending on the type, this subtree will be visited either directly before or directly after the install takes place.

Parameters:
type - The type of panels these are
node - The node to add
 o addNode
 public void addNode(int place,
                     WizardComponent node)
Adds a panel subtree to a particular place in the install panel sequence. Valid places are InstallArchiveWriter.POST_WELCOME, InstallArchiveWriter.PRE_VERIFY, InstallArchiveWriter.PREINSTALL, or InstallArchiveWriter.POSTINSTALL. If you intend this subtree to be extracted by a HierarchyNode during a hierarchical install, then the node added here should be of type WizardComposite!.

Parameters:
place - The place to put the panels. They will also be displayed at the corresponding place in a wizard hierarchy install.
node - The node to add
 o addWizard
 public void addWizard(String relativePath,
                       int installType)
Adds a child wizard to this wizard. The child wizard will be opened at run-time with the relative path supplied, and it's subtrees available to nodes (such as the HierarchyNode).

Parameters:
relativePath - The relative path of the wizard to be added, relative to this wizard's path.
installType - The type of install that should be set for the added wizard. valid types are:
  • NO_INSTALL - No Installation
  • DEFAULT_INSTALL - Default Installation
  • CUSTOM_INSTALL - Custom Installation
 o createWizardConnectorTree
 protected void createWizardConnectorTree()
Creates a client tree for a wizard that doesn't install anything itself, it just calls into other wizards and acts as a top-level product installer (a wizard "connector").

 o createWizardTree
 public void createWizardTree()
This method is called when it is time to create the client tree for a true wizard (i.e. not a wizard that controls other wizards). It should be called *after* any customizations are to be done (such as changing the Welcome screen).

 o writeArchive
 public void writeArchive()
Write the install wizard to disk.


All Packages  Class Hierarchy  This Package  Previous  Next  Index