}
public void addVariableDefinition(VariableDefinition definition, String value) {
String variableName = definition.getVariableName();
if (template.getDefinitions().containsKey(variableName)) {
throw new ValidationException("The variable definition " + variableName + " already exists");
}
template.getDefinitions().put(variableName, definition);
VariableValue variableValue = definition.newVariableValue(value);
definition.validate(this, variableValue);
this.variables.put(variableName, variableValue);