|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.jsdt.facade.DynamicSolutionConfiguration
com.ibm.jsdt.facade.VariableConfiguration
public class VariableConfiguration
This class provides a facade of apis to modify variable values. It can be used to perform the functions listed below. See method descriptions for more information.
NOTE: For any method that fails, an exception will be thrown. The exception object will contain the error message pertaining to the failure as well as additional information that may be pertinent. See the Java doc for each exception object for more information.
Constructor Summary | |
---|---|
VariableConfiguration()
Instantiates a VariableConfiguration option that is used to set and retrieve variable values. |
Method Summary | |
---|---|
java.lang.String |
getCurrentSharedVariableValue(java.lang.String variableName)
Returns the current value for the specified shared variable. |
java.lang.String |
getCurrentVariableValue(java.lang.String taskID,
java.lang.String applicationID,
java.lang.String variableName)
Return the current value for the specified variable. |
java.lang.String |
getCurrentVariableValueByKey(java.lang.String key)
Return the current value for the specified variable. |
void |
setSharedVariableValue(java.lang.String variableName,
java.lang.String value)
Overrides the current value of the specified shared variable. |
void |
setSharedVariableValue(java.lang.String variableName,
java.lang.String value,
boolean overrideValue)
Sets the default value or the current value of the specified shared variable depending on the value of the overrideValue boolean that is passed in. |
void |
setVariableValue(java.lang.String taskID,
java.lang.String applicationID,
java.lang.String variableName,
java.lang.String value)
Overrides the current value of the specified variable. |
void |
setVariableValue(java.lang.String taskID,
java.lang.String applicationID,
java.lang.String variableName,
java.lang.String value,
boolean overrideValue)
Sets the default value or the current value of the specified variable depending on the value of the overrideValue boolean that is passed in. |
void |
setVariableValueByKey(java.lang.String key,
java.lang.String value)
Overrides the current value of the specified variable. |
void |
setVariableValueByKey(java.lang.String key,
java.lang.String value,
boolean overrideValue)
Sets the default value or the current value of the specified variable depending on the value of the overrideValue boolean that is passed in. |
void |
skipAllConfigurationPanels(boolean skip)
Sets a boolean indicating whether or not the deployment wizard should skip all configuration panels. |
Methods inherited from class com.ibm.jsdt.facade.DynamicSolutionConfiguration |
---|
getApplicationIDList, getDeployables, getMainManager, getSharedVariableIDList, getSharedVariables, getSuite, getTaskGroupIDList, getTaskGroups, getTaskIDList, getTaskIDList, getTopLevelDeployables, getVariableIDList, isDeploymentWizardRunning, setDeployables, setMainManager, setSuite, setTopLevelDeployables, validateSolution |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VariableConfiguration() throws DeployerNotRunningException
DeployerNotRunningException
- if this object is instantiated and the Deployment Wizard is not running
interactively or via a task file deployment. An example of improper usage would be attempting to
instantiating this class within a user program(i.e PreDeployment Checker, Main , Entry or Exit)Method Detail |
---|
public void setVariableValueByKey(java.lang.String key, java.lang.String value) throws VariableNotFoundException, InvalidVariableValueException, InvalidVariableFormatException
key
- is the fully qualified variable for which you want to set the valuevalue
- is the new value for the specified variable
VariableNotFoundException
- if the variable could not be found within the specified task and application
InvalidVariableValueException
- if the value specified is invalid based on the validation rules for the specified variable
InvalidVariableFormatException
- if the key format is not <taskID>.<applicationID>.<variableName>public void setVariableValue(java.lang.String taskID, java.lang.String applicationID, java.lang.String variableName, java.lang.String value) throws VariableNotFoundException, InvalidVariableValueException
taskID
- is the id of the task that contains the application that contains the variable that you want to
override the value for.applicationID
- is the id of the application that contains the variable that you want to override
the value for.variableName
- is the name of the variable that you want to override the value forvalue
- is the new value for the specified variable
VariableNotFoundException
- if the variable could not be found within the specified task and application
InvalidVariableValueException
- if the value specified is invalid based on the validation rules for the specified variablepublic void setVariableValueByKey(java.lang.String key, java.lang.String value, boolean overrideValue) throws VariableNotFoundException, InvalidVariableValueException, InvalidVariableFormatException
The value specified must pass all validation associated with the specified variable. If validation fails no changes will be made an an InvalidVariableValueException will be thrown. See the deployment wizard log file and exception object for specific errors. NOTE: If valid this method will override customer specified values. This may not be expected by the customer. Consider setting these variables to readOnly or hidden or skipping the display of the configuration panels if you never want the customer modified values to be honored.
key
- is the fully qualified variable for which you want to set the valuevalue
- is the new value for the specified variableoverrideValue
- indicates whether or not you want to always override the current value
VariableNotFoundException
- if the variable could not be found within the specified task and application
InvalidVariableValueException
- if the value specified is invalid based on the validation rules for the specified variable
InvalidVariableFormatException
- if the key format is not <taskID>.<applicationID>.<variableName>public void setVariableValue(java.lang.String taskID, java.lang.String applicationID, java.lang.String variableName, java.lang.String value, boolean overrideValue) throws VariableNotFoundException, InvalidVariableValueException
The value specified must pass all validation associated with the specified variable. If validation fails no changes will be made an an InvalidVariableValueException will be thrown. See the deployment wizard log file and exception object for specific errors. NOTE: If valid this method will override customer specified values. This may not be expected by the customer. Consider setting these variables to readOnly or hidden or skipping the display of the configuration panels if you never want the customer modified values to be honored.
taskID
- is the id of the task that contains the application that contains the variable that you want to
override the value for.applicationID
- is the id of the application that contains the variable that you want to override
the value for.variableName
- is the name of the variable that you want to override the value forvalue
- is the new value for the specified variableoverrideValue
- indicates whether or not you want to always override the current value
VariableNotFoundException
- if the variable could not be found within the specified task and application
InvalidVariableValueException
- if the value specified is invalid based on the validation rules for the specified variablepublic void setSharedVariableValue(java.lang.String variableName, java.lang.String value, boolean overrideValue) throws VariableNotFoundException, InvalidVariableValueException
The value specified must pass all validation associated with the specified variable. If validation fails no changes will be made an an InvalidVariableValueException will be thrown. See the deployment wizard log file and exception object for specific errors. NOTE: If valid this method will override customer specified values. This may not be expected by the customer. Consider setting these variables to readOnly or hidden or skipping the display of the configuration panels if you never want the customer modified values to be honored.
variableName
- is the name of the shared variable that you want to override the value forvalue
- is the new value for the specified shared variableoverrideValue
- indicates whether or not you want to always override the current value
VariableNotFoundException
- if the variable could not be found within the specified task and application
InvalidVariableValueException
- if the value specified is invalid based on the validation rules for the specified shared variable. If no validation or
default value was specified for the shared variable the validation rules of the first editable variable that this shared variable is associated with, will be used.public void setSharedVariableValue(java.lang.String variableName, java.lang.String value) throws VariableNotFoundException, InvalidVariableValueException
variableName
- is the name of the shared variable that you want to override the value forvalue
- is the new value for the specified shared variable
VariableNotFoundException
- if the shared variable could not be found
InvalidVariableValueException
- if the value specified is invalid based on the validation rules for the specified shared variable. If no validation or
default value was specified for the shared variable the validation rules of the first editable variable that this shared variable is associated with, will be used.public java.lang.String getCurrentVariableValueByKey(java.lang.String key) throws VariableNotFoundException, InvalidVariableFormatException
key
- is the fully qualified variable for which you need the current value
String
Null will be returned if the variable can not be found
VariableNotFoundException
- if the specified variable can not be found
InvalidVariableFormatException
- if the key format is not <taskID>.<applicationID>.<variableName>public java.lang.String getCurrentVariableValue(java.lang.String taskID, java.lang.String applicationID, java.lang.String variableName) throws VariableNotFoundException
taskID
- - The id of the task that contains the application that contains the specified variable.applicationID
- - The id of the application that contains the specified variable.variableName
- - The name of the variable that you need the current value of.
String
Null will be returned if the variable can not be found
VariableNotFoundException
- if the specified variable can not be found.public java.lang.String getCurrentSharedVariableValue(java.lang.String variableName) throws VariableNotFoundException
variableName
- - The sharedAs name of the shared variable to return the value of.
String
If the variable does not exist, null will be returned.
VariableNotFoundException
- if the specified variable can not be found.public void skipAllConfigurationPanels(boolean skip)
Once all task selections have been made and variable values have been set, the validateSolution() method should be called to ensure that the solution is valid based on all changes that have been made. For example, the validate method will not allow configuration panels to be skipped if any variable that is contained in a selected task is not valid. As a safety precaution, the Deployment Wizard will still validate the the solution when it is loaded and the skip flag will be set to false if variable values are invalid. However, it's best if you proactively invoke validateSolution so your class can take any necessary corrective action. NOTE: This flag is only valid during the current deployment wizard session.
skip
- indicates whether or not all configuration panels should be skipped.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |