*
* @param repo the repository to register with, not null
* @param appContext the Spring application context, not null
*/
protected void initFunctions(final ComponentRepository repo, final GenericApplicationContext appContext) {
final CompiledFunctionService compiledFunctionService = appContext.getBean(CompiledFunctionService.class);
final ComponentInfo infoCFS = new ComponentInfo(CompiledFunctionService.class, getClassifier());
repo.registerComponent(infoCFS, compiledFunctionService);
final ComponentInfo infoFR = new ComponentInfo(FunctionRepository.class, getClassifier());
repo.registerComponent(infoFR, compiledFunctionService.getFunctionRepository());
final FunctionExclusionGroups functionExclusionGroups = appContext.getBean(FunctionExclusionGroups.class);
repo.registerComponent(new ComponentInfo(FunctionExclusionGroups.class, getClassifier()), functionExclusionGroups);
final FunctionResolver functionResolver = appContext.getBean(FunctionResolver.class);
repo.registerComponent(new ComponentInfo(FunctionResolver.class, getClassifier()), functionResolver);
if (isPublishRest()) {
repo.getRestComponents().publishResource(new DataFunctionRepositoryResource(compiledFunctionService.getFunctionRepository()));
}
}