All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.install.products.StateKeyDependency

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

public class StateKeyDependency
extends InstallNode
This is a sample of a state key dependency that depends on the value associated with a key in a WizardState. This dependency can be used in the product tree to activate/deactivate parts of the product tree based on a value set in the WizardState.


Variable Index

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

Constructor Index

 o StateKeyDependency()
Creates a new StateKeyDependency object.
 o StateKeyDependency(String, boolean)
Constructs a new state key dependency with required information, including inversion.

Method Index

 o addRuntimeResources(Vector)
Add the runtime resources required by this class.
 o getInvert()
Gets the invert state of this InstallComponent
 o getKey()
Returns the key that this StateKeyDependency will interrogate at runtime.
 o refresh(Vector, String)
Update this dependency.
 o setInvert(boolean)
Sets the invert state of this InstallComponent
 o setKey(String)
Sets the key that this StateKeyDependency will interrogate at runtime.

Variables

 o invert
 protected boolean invert
Note: invert is deprecated. use set/getInvert()

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

Constructors

 o StateKeyDependency
 public StateKeyDependency()
Creates a new StateKeyDependency object. This constructor does not set up the key that the dependency should interrogate at runtime. This can be done through a call to setKey().

 o StateKeyDependency
 public StateKeyDependency(String key,
                           boolean inverted)
Constructs a new state key dependency with required information, including inversion.

Parameters:
key - The key to be dependent on.
inverted - A flag indicating this dependency should invert its results. If this is false, the value identifyed by the specified key will not be inverted. If the inverted flag is true, that value will be inverted.

Methods

 o setKey
 public void setKey(String key)
Sets the key that this StateKeyDependency will interrogate at runtime.

Parameters:
key - The WizardState key identifying a Boolean object or a String object indicating true/false (ex. String("true")). Assuming that the inverted flag is false, a value of true results in this node, and the children it controls to be activated (so it will install). A value of false makes this node and its children inactive.
 o getKey
 public String getKey()
Returns the key that this StateKeyDependency will interrogate at runtime.

Returns:
A string identifying a WizardState key.
 o getInvert
 public boolean getInvert()
Gets the invert state of this InstallComponent

Returns:
The invert state of this component
 o setInvert
 public void setInvert(boolean invert)
Sets the invert state of this InstallComponent

Parameters:
invert - The new invert state
 o refresh
 public boolean refresh(Vector targets,
                        String sharedPoolKey)
Update this dependency.

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 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 InstallNode

All Packages  Class Hierarchy  This Package  Previous  Next  Index