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
-
aboutMsg
- The localized text that will appear on the about..
Deprecated.
-
archiveName
- This is the name of the resulting wizard archive class.
Deprecated.
-
baselineImageName
- The name of the baseline image (in Wizard Resource form) to place in the wizard
Deprecated.
-
cancelMsg
- The text that appears when the user presses the cancel button.
Deprecated.
-
CUSTOM_INSTALL
- Indicates a wizard which will default to being customized by the user.
-
DEFAULT_INSTALL
- Indicates a wizard which will default to installing with its default
settings
-
defaultDirectory
- The default install directory
Deprecated.
-
exitMsg
- The text that appears when the user presses the exit button.
Deprecated.
-
iconName
- The name of the icon image (the image displayed when the wizard is minimized)
Deprecated.
-
imageName
- The name of the image (in Wizard Resource form) to place in the wizard
Deprecated.
-
installResources
- The resource list required by the install wizard.
Deprecated.
-
installRoot
- The root of the client-side install panel tree.
Deprecated.
-
installSequence
- Sequence used to initialize the product tree, as well as drive it
during an install or uninstall.
Deprecated.
-
installTypePanel
- The (possibly) customized "Install Type" panel
Deprecated.
-
NO_INSTALL
- Indicates a wizard which will default to not being installed.
-
POST_WELCOME
- Used when adding a subtree after the "Welcome" Panel.
-
POSTINSTALL
- Used when adding a panel as a pre- or post-configuration panel
-
postinstallnode
- A subtree to visit just after installation
Deprecated.
-
PRE_VERIFY
- Used when adding a subtree to be displayed just before the "Verify" Panel.
-
PREINSTALL
- Used when adding a panel as a pre- or post-configuration panel
-
preinstallnode
- A subtree to visit just before installation
Deprecated.
-
product
- The product tree which represents this product and its components
Deprecated.
-
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.
-
productName
- The name of the product we are installing
Deprecated.
-
progressImageName
-
The image that appears during the actual installation (while the
progress bars are advancing).
Deprecated.
-
selectedChildren
- Maintains a list of any child wizard archives
Deprecated.
-
selectedComponentIDs
- Maintains a list of any selected components, if we are creating a wizard
Deprecated.
-
welcomePanel
- The (possibly) customized "Welcome" panel
Deprecated.
-
wizardRuntimePath
- The path to the Wizard runtime classes.
Deprecated.
-
wizardState
- This is the wizardState that will be saved in the archive.
Deprecated.
-
InstallArchiveWriter()
- Create an InstallArchiveWriter object.
-
addCollection(ResourceCollection)
- Adds a collection of resources to the archive.
-
addComponent(InstallComponent)
-
Adds an arbitrary InstallComponent to the top of the product
tree.
-
addComponent(InstallComponent, boolean, boolean)
-
Adds an arbitrary InstallComponent to the top of the product
tree.
-
addComponent(Msg, String, String, boolean, boolean, Hashtable)
- This method builds the product tree for this product.
-
addConfigurationNode(int, WizardComponent)
- Adds a panel subtree as either a pre- or a post-install configuration panel.
Deprecated.
-
addInitializationTask(Task)
-
Adds a task to the initialization sequence for this wizard.
-
addNode(int, WizardComponent)
- Adds a panel subtree to a particular place in the install panel sequence.
-
addResource(String, ResourceWriter)
- Add a resource to the archive.
Deprecated.
-
addWizard(String, int)
- Adds a child wizard to this wizard.
-
createClientTree()
- Builds the client panel tree.
-
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").
-
createWizardTree()
- This method is called when it is time to create the client tree
for a true wizard (i.e.
-
getArchiveName()
- Returns the name of this wizard archive (without the ".class" extension)
-
getBaselineImage()
- Gets the name of the baselineImage to be included in this wizard.
-
getConnector()
- Whether to build a connector wizard or not.
-
getDefaultDirectory()
- Gets the default install directory for this product.
-
getIcon()
-
Gets the name of the icon to be included in this wizard.
-
getImage()
- Gets the name of the image to be included in this wizard.
-
getNames(String, String[])
- Returns filename (without paths or extensions)
of all files with the specified extensions from the specified path
-
getProductName()
- Gets the name of this product
-
getRoot()
- Returns the WizardComposite object that is the root of the client
tree.
-
getWelcomePanel()
- Gets the first panel to be seen during the wizard
-
getWizardRuntimeClasspath()
- getWizardRuntimeClasspath looks at the classpath for the
wizard class files.
-
getWizardState()
- Returns the WizardState object that will be written into the
wizard archive.
-
setAboutMsg(Msg)
-
Set the Msg that will appear in the "About" button on the
default WelcomePanel.
-
setArchiveName(String)
- Sets the name of this archive, omitting the ".class" extension.
-
setBaselineImage(String)
- Sets the baselineImage for this product.
-
setCancelMsg(Msg)
- Set the text that will appear when the user clicks the 'cancel' button
-
setConnector(boolean)
- Causes this class to build a connector wizard, or hierarchical wizard.
-
setDefaultDirectory(String)
-
Sets the default install directory of this product.
-
setExitMsg(Msg)
- Set the text that will appear when the user clicks the 'exit' button
-
setIcon(String)
- Sets the icon for this product.
-
setImage(String)
- Sets the image for this wizard.
-
setProduct(Product)
- Sets the product (the root of the product tree).
-
setProductName(String)
- Sets the name of this product.
-
setProgressImage(String)
-
Sets the image to be displayed during install (when the files
are actually being written).
-
setProgressVisual(ProgressVisual)
-
Sets the Visual to be displayed during the Progress Panel (installation).
-
setResources()
-
Adds the resources required by this wizard.
-
setRoot(WizardComposite)
- Sets the WizardComposite object that will be the root of the client panel tree.
-
setWelcomePanel(WizardLeaf)
- Sets the first panel to be seen during the wizard.
-
setWizardState(WizardState)
- Sets the WizardState object that will be written into the
wizard archive.
-
writeArchive()
- Write the install wizard to disk.
wizardState
protected WizardState wizardState
- Note: wizardState is deprecated.
use get/setWizardState()
- This is the wizardState that will be saved in the archive.
exitMsg
protected Msg exitMsg
- Note: exitMsg is deprecated.
use get/setExitMsg()
- The text that appears when the user presses the exit button.
cancelMsg
protected Msg cancelMsg
- Note: cancelMsg is deprecated.
use get/setCancelMsg()
- The text that appears when the user presses the cancel button.
installRoot
protected WizardComposite installRoot
- Note: installRoot is deprecated.
- The root of the client-side install panel tree.
installResources
protected Hashtable installResources
- Note: installResources is deprecated.
- The resource list required by the install wizard.
welcomePanel
protected WizardLeaf welcomePanel
- Note: welcomePanel is deprecated.
- The (possibly) customized "Welcome" panel
installTypePanel
protected WizardLeaf installTypePanel
- Note: installTypePanel is deprecated.
- The (possibly) customized "Install Type" panel
preinstallnode
protected WizardComponent preinstallnode
- Note: preinstallnode is deprecated.
- A subtree to visit just before installation
postinstallnode
protected WizardComponent postinstallnode
- Note: postinstallnode is deprecated.
- A subtree to visit just after installation
productName
protected String productName
- Note: productName is deprecated.
- The name of the product we are installing
defaultDirectory
protected String defaultDirectory
- Note: defaultDirectory is deprecated.
- The default install directory
product
protected Product product
- Note: product is deprecated.
- The product tree which represents this product and its components
selectedComponentIDs
protected Vector selectedComponentIDs
- Note: selectedComponentIDs is deprecated.
- Maintains a list of any selected components, if we are creating a wizard
selectedChildren
protected Vector selectedChildren
- Note: selectedChildren is deprecated.
- Maintains a list of any child wizard archives
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).
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.
aboutMsg
protected Msg aboutMsg
- Note: aboutMsg is deprecated.
- The localized text that will appear on the about.. button
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.
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
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
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)
NO_INSTALL
public static final int NO_INSTALL
- Indicates a wizard which will default to not being installed.
DEFAULT_INSTALL
public static final int DEFAULT_INSTALL
- Indicates a wizard which will default to installing with its default
settings
archiveName
protected String archiveName
- Note: archiveName is deprecated.
use set/getArchiveName()
- This is the name of the resulting wizard archive class.
CUSTOM_INSTALL
public static final int CUSTOM_INSTALL
- Indicates a wizard which will default to being customized by the user.
PREINSTALL
public static final int PREINSTALL
- Used when adding a panel as a pre- or post-configuration panel
POSTINSTALL
public static final int POSTINSTALL
- Used when adding a panel as a pre- or post-configuration panel
POST_WELCOME
public static final int POST_WELCOME
- Used when adding a subtree after the "Welcome" Panel.
PRE_VERIFY
public static final int PRE_VERIFY
- Used when adding a subtree to be displayed just before the "Verify" Panel.
wizardRuntimePath
protected String wizardRuntimePath
- Note: wizardRuntimePath is deprecated.
use getWizardRuntimeClasspath()
- The path to the Wizard runtime classes.
InstallArchiveWriter
public InstallArchiveWriter()
- Create an InstallArchiveWriter object.
createClientTree
protected void createClientTree()
- Builds the client panel tree.
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.
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.
getConnector
public boolean getConnector()
- Whether to build a connector wizard or not.
- Returns:
- Whether to build a connector wizard or not.
getWizardRuntimeClasspath
public String getWizardRuntimeClasspath()
- getWizardRuntimeClasspath looks at the classpath for the
wizard class files.
- Returns:
- The absolute pathname of the specified class.
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
getWelcomePanel
public WizardLeaf getWelcomePanel()
- Gets the first panel to be seen during the wizard
- Returns:
- The first panel to be seen during the wizard
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
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
getProductName
public String getProductName()
- Gets the name of this product
- Returns:
- The name of this product.
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
getDefaultDirectory
public String getDefaultDirectory()
- Gets the default install directory for this product.
- Returns:
- The default install directory.
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.
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.
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
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.
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
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)
setArchiveName
public void setArchiveName(String archiveName)
- Sets the name of this archive, omitting the ".class" extension.
- Parameters:
- archiveName - The name of this archive
getImage
public String getImage()
- Gets the name of the image to be included in this wizard.
- Returns:
- The name of the image.
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.
getIcon
public String getIcon()
- Gets the name of the icon to be included in this wizard.
- Returns:
- The name of the icon.
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.
getBaselineImage
public String getBaselineImage()
- Gets the name of the baselineImage to be included in this wizard.
- Returns:
- The name of the baselineImage.
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
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
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.
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.
setProgressVisual
public void setProgressVisual(ProgressVisual progressVisual)
- Sets the Visual to be displayed during the Progress Panel (installation).
- Parameters:
- progressVisual - The visual to display
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.
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.
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.
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.
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.
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.
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.
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
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
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
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").
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).
writeArchive
public void writeArchive()
- Write the install wizard to disk.
All Packages Class Hierarchy This Package Previous Next Index