repo.registerComponent(info, ooc);
return ooc;
}
protected void initFunctionExecutionContext(final ComponentRepository repo, final LinkedHashMap<String, String> configuration, final OverrideOperationCompiler ooc) {
final FunctionExecutionContext context = new FunctionExecutionContext();
OpenGammaExecutionContext.setHistoricalTimeSeriesSource(context, getHistoricalTimeSeriesSource());
OpenGammaExecutionContext.setRegionSource(context, getRegionSource());
OpenGammaExecutionContext.setExchangeSource(context, getExchangeSource());
OpenGammaExecutionContext.setHolidaySource(context, getHolidaySource());
OpenGammaExecutionContext.setOrganizationSource(context, getOrganizationSource());
OpenGammaExecutionContext.setConventionBundleSource(context, getConventionBundleSource());
OpenGammaExecutionContext.setConventionSource(context, getConventionSource());
OpenGammaExecutionContext.setOrganizationSource(context, getOrganizationSource());
OpenGammaExecutionContext.setConfigSource(context, getConfigSource());
if (getConfigMaster() != null) {
OpenGammaExecutionContext.setConfigMaster(context, getConfigMaster());
}
OpenGammaExecutionContext.setOverrideOperationCompiler(context, ooc);
context.setSecuritySource(getSecuritySource());
context.setPortfolioStructure(new PortfolioStructure(getPositionSource()));
if (getViewProcessor() != null) {
OpenGammaExecutionContext.setViewProcessor(context, getViewProcessor());
}
final ComponentInfo info = new ComponentInfo(FunctionExecutionContext.class, getClassifier());
repo.registerComponent(info, context);