use of org.apache.camel.component.browse.BrowseComponent in project camel by apache.
the class BrowseComponentAutoConfiguration method configureBrowseComponent.
@Lazy
@Bean(name = "browse-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(BrowseComponent.class)
public BrowseComponent configureBrowseComponent(CamelContext camelContext) throws Exception {
BrowseComponent component = new BrowseComponent();
component.setCamelContext(camelContext);
return component;
}
use of org.apache.camel.component.browse.BrowseComponent in project camel by apache.
the class BrowseComponentConfigurationAndDocumentationTest method testComponentConfiguration.
@Test
public void testComponentConfiguration() throws Exception {
BrowseComponent comp = context.getComponent("browse", BrowseComponent.class);
EndpointConfiguration conf = comp.createConfiguration("browse:seda:foo?synchronous=true");
assertEquals("true", conf.getParameter("synchronous"));
ComponentConfiguration compConf = comp.createComponentConfiguration();
String json = compConf.createParameterJsonSchema();
assertNotNull(json);
assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"displayName\": \"Name\", \"group\": \"common\", \"required\": true, \"type\": \"string\""));
assertTrue(json.contains("\"synchronous\": { \"kind\": \"parameter\", \"displayName\": \"Synchronous\", \"group\": \"advanced\", \"label\": \"advanced\", \"type\": \"boolean\""));
}
Aggregations