use of org.apache.camel.language.simple.FileLanguage in project camel by apache.
the class FileLanguageAutoConfiguration method configureFileLanguage.
@Bean(name = "file-language")
@Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(FileLanguage.class)
public FileLanguage configureFileLanguage(CamelContext camelContext, FileLanguageConfiguration configuration) throws Exception {
FileLanguage language = new FileLanguage();
if (CamelContextAware.class.isAssignableFrom(FileLanguage.class)) {
CamelContextAware contextAware = CamelContextAware.class.cast(language);
if (contextAware != null) {
contextAware.setCamelContext(camelContext);
}
}
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null, false);
IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), language, parameters);
return language;
}
Aggregations