use of org.apache.camel.language.xquery.XQueryLanguage in project camel by apache.
the class XQueryLanguageAutoConfiguration method configureXQueryLanguage.
@Bean(name = "xquery-language")
@Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(XQueryLanguage.class)
public XQueryLanguage configureXQueryLanguage(CamelContext camelContext, XQueryLanguageConfiguration configuration) throws Exception {
XQueryLanguage language = new XQueryLanguage();
if (CamelContextAware.class.isAssignableFrom(XQueryLanguage.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