presetCategoryID = parameter.getName();
final Preset preset = toolPresets
.getPreset(presetCategoryID);
presetSetting = preset.getSetting(parameter.getValue());
if (presetSetting == null) {
throw new ConfigurationException(String.format(
"The preset '%s = %s' has not been defined"
+ " in the configuration.",
parameter.getName(), parameter.getValue()));
}
} else {
throw new ConfigurationException(String.format(
"More than one preset was specified in the "
+ "parameters. Found '%s"
+ " = %s' and '%s = %s'.",
presetCategoryID, presetSetting.getName(),
parameter.getName(), parameter.getValue()));