use of org.apache.camel.component.language.LanguageComponent in project camel by apache.
the class LanguageComponentConfigurationAndDocumentationTest method testComponentConfiguration.
@Test
public void testComponentConfiguration() throws Exception {
LanguageComponent comp = context.getComponent("language", LanguageComponent.class);
EndpointConfiguration conf = comp.createConfiguration("language:simple:foo?transform=false");
assertEquals("false", conf.getParameter("transform"));
ComponentConfiguration compConf = comp.createComponentConfiguration();
String json = compConf.createParameterJsonSchema();
assertNotNull(json);
assertTrue(json.contains("\"languageName\": { \"kind\": \"path\", \"displayName\": \"Language Name\", \"group\": \"producer\", \"required\": true"));
assertTrue(json.contains("\"script\": { \"kind\": \"parameter\", \"displayName\": \"Script\", \"group\": \"producer\", \"type\": \"string\""));
}
use of org.apache.camel.component.language.LanguageComponent in project camel by apache.
the class LanguageComponentAutoConfiguration method configureLanguageComponent.
@Lazy
@Bean(name = "language-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(LanguageComponent.class)
public LanguageComponent configureLanguageComponent(CamelContext camelContext) throws Exception {
LanguageComponent component = new LanguageComponent();
component.setCamelContext(camelContext);
return component;
}
Aggregations