All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.install.products.SunJDKDependency

java.lang.Object
   |
   +----com.sun.install.products.InstallComponent
           |
           +----com.sun.install.products.InstallNode
                   |
                   +----com.sun.install.products.SunJDKDependency

public class SunJDKDependency
extends InstallNode
This is a sample of a SOLARIS dependency that depends on the version of java installed in /usr/bin.

SunJDKDependency is a generic InstallNode that you can insert into a product tree to affect what is visible below it. Calling upon the refresh() method with a target of "nodeIsActive" will make the dependency enforce its rules by checking its dependency, and turning itself on or off.


Variable Index

 o invert
A flag indicating this dependency should be inverted (equivelent to the boolean operation 'not')
 o version
The JDK version this dependency is configured with.

Constructor Index

 o SunJDKDependency()
Constructs a new SunJDKDependency.
 o SunJDKDependency(String, boolean)
Constructs a new Sun JDK dependency with required information, including inversion.

Method Index

 o initialize(WizardState)
Initialize this object.
 o refresh(Vector, String)
Update this dependency.

Variables

 o invert
 protected boolean invert
A flag indicating this dependency should be inverted (equivelent to the boolean operation 'not')

 o version
 protected String version
The JDK version this dependency is configured with. This determines whether the children of this dependency participate in tree operations or not.

Constructors

 o SunJDKDependency
 public SunJDKDependency()
Constructs a new SunJDKDependency.

 o SunJDKDependency
 public SunJDKDependency(String version,
                         boolean inverted)
Constructs a new Sun JDK dependency with required information, including inversion.

Parameters:
version - The JDK version this dependency depends on. Children of this node will not be allowed to participate in installs if this version is not installed unless inverted is true.
inverted - A flag indicating this dependency should invert its results. If this is false, the dependency does not allow participation of its children if the runtime Sun JDK does not match the supplied Sun JDK

Methods

 o refresh
 public boolean refresh(Vector targets,
                        String sharedPoolKey)
Update this dependency. For example, if we are on a Windows-based platform and this InstallComponent has some children that should only be installed on SPARC-based platforms, this would omit the inactive InstallComponent's information (Destination table, whether it will install or not). In effect, it halts any data-gathering operation that might otherwise be passed down to its children. For a SoftwareComponent, this method searches for it being "selected" by the user, and turns itself "off" if it is not selected.

Parameters:
targets - The target properties (set via setProperty()) to update.
sharedPoolKey - the key used to access the shared pool to keep track of shared components.
Returns:
true if the refresh was sucessful, falseotherwise.
Overrides:
refresh in class InstallNode
 o initialize
 public boolean initialize(WizardState state)
Initialize this object. For JDK Dependencies, all we have to do is check the dependency in order to initialize.

Parameters:
state - The WizardState this object belongs to.
Returns:
Whether the initialization was successful or not.
Overrides:
initialize in class InstallNode

All Packages  Class Hierarchy  This Package  Previous  Next  Index