public interface VariableSpace
| Modifier and Type | Method and Description |
|---|---|
void |
copyVariablesFrom(VariableSpace space)
Copy the variables from another space, without initializing with the defaults.
|
String |
environmentSubstitute(String aString)
Substitute the string using the current variable space.
|
String[] |
environmentSubstitute(String[] string)
Replaces environment variables in an array of strings.
|
String |
fieldSubstitute(String aString,
RowMetaInterface rowMeta,
Object[] rowData)
Substitutes field values in
aString. |
boolean |
getBooleanValueOfVariable(String variableName,
boolean defaultValue)
This method returns a boolean for the new variable check boxes.
|
VariableSpace |
getParentVariableSpace()
Get the parent of the variable space.
|
String |
getVariable(String variableName)
Get the value of a variable.
|
String |
getVariable(String variableName,
String defaultValue)
Get the value of a variable with a default in case the variable is not found.
|
void |
initializeVariablesFrom(VariableSpace parent)
Initialize variable space using the defaults, copy over the variables from the parent (using copyVariablesFrom()),
after this the "injected" variables should be inserted (injectVariables()).
|
void |
injectVariables(Map<String,String> prop)
Inject variables.
|
String[] |
listVariables()
List the variables (not the values) that are currently in the variable space.
|
void |
setParentVariableSpace(VariableSpace parent)
Set the parent variable space
|
void |
setVariable(String variableName,
String variableValue)
Sets a variable in the Kettle Variables list.
|
void |
shareVariablesWith(VariableSpace space)
Share a variable space from another variable space.
|
void initializeVariablesFrom(VariableSpace parent)
parent - the parent to start from, or null if root.void copyVariablesFrom(VariableSpace space)
space - the space to copy the variables from.void shareVariablesWith(VariableSpace space)
space - Variable space to be shared.VariableSpace getParentVariableSpace()
void setParentVariableSpace(VariableSpace parent)
parent - The parent variable space to setvoid setVariable(String variableName, String variableValue)
variableName - The name of the variable to setvariableValue - The value of the variable to set. If the variableValue is null, the variable is cleared from the list.String getVariable(String variableName, String defaultValue)
variableName - The name of the variabledefaultValue - The default value in case the variable could not be foundString getVariable(String variableName)
variableName - The name of the variableboolean getBooleanValueOfVariable(String variableName, boolean defaultValue)
variableName - The variable to look up.defaultValue - The default value to return.static method ValueMeta.convertStringToBoolean()String[] listVariables()
String environmentSubstitute(String aString)
aString - The string to substitute.String[] environmentSubstitute(String[] string)
string - The array of strings that wants its variables to be replaced.void injectVariables(Map<String,String> prop)
prop - Properties object containing key-value pairs.String fieldSubstitute(String aString, RowMetaInterface rowMeta, Object[] rowData) throws KettleValueException
aString. Field values are of the form "?{aString - the string on which to apply the substitution.rowMeta - The row metadata to use.rowData - The row data to useKettleValueException - In case there is a String conversion error