final ValueRequirement desiredValue = desiredValues.iterator().next();
final Currency currency = FinancialSecurityUtils.getCurrency(security);
final String surfaceName = desiredValue.getConstraint(ValuePropertyNames.SURFACE);
final String curveCalculationConfigName = desiredValue.getConstraint(ValuePropertyNames.CURVE_CALCULATION_CONFIG);
final ConfigSource configSource = OpenGammaExecutionContext.getConfigSource(executionContext);
final ConfigDBCurveCalculationConfigSource curveCalculationConfigSource = new ConfigDBCurveCalculationConfigSource(configSource);
final MultiCurveCalculationConfig curveCalculationConfig = curveCalculationConfigSource.getConfig(curveCalculationConfigName);
if (curveCalculationConfig == null) {
throw new OpenGammaRuntimeException("Could not find curve calculation configuration named " + curveCalculationConfigName);
}
String[] curveNames = curveCalculationConfig.getYieldCurveNames(); //TODO
if (curveNames.length == 1) {