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.
-
invert
- A flag indicating this dependency should be inverted (equivelent to the
boolean operation 'not')
Deprecated.
-
StateKeyDependency()
- Creates a new StateKeyDependency object.
-
StateKeyDependency(String, boolean)
- Constructs a new state key dependency with required information, including inversion.
-
addRuntimeResources(Vector)
- Add the runtime resources required by this class.
-
getInvert()
- Gets the invert state of this InstallComponent
-
getKey()
- Returns the key that this StateKeyDependency will interrogate at runtime.
-
refresh(Vector, String)
-
Update this dependency.
-
setInvert(boolean)
- Sets the invert state of this InstallComponent
-
setKey(String)
- Sets the key that this StateKeyDependency will interrogate at runtime.
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')
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().
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.
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.
getKey
public String getKey()
- Returns the key that this StateKeyDependency will interrogate at runtime.
- Returns:
- A string identifying a WizardState key.
getInvert
public boolean getInvert()
- Gets the invert state of this InstallComponent
- Returns:
- The invert state of this component
setInvert
public void setInvert(boolean invert)
- Sets the invert state of this InstallComponent
- Parameters:
- invert - The new invert state
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
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