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