Map<String, CalculatedVariableDefinition> calculations = this.template.getCalculations();
for (String key : calculations.keySet()) {
if (!this.variables.containsKey(key)) {
// was not provided by the user, so let's calculate it!
CalculatedVariableDefinition calculatedVariableDefinition = calculations.get(key);
VariableValue variableValue = calculatedVariableDefinition.calculate(new EnvironmentVariableContext(this, key));
this.variables.put(calculatedVariableDefinition.getVariableName(), variableValue);
}
}
}