Search in sources :

Example 1 with SalesforceUpsertContactComponent

use of org.foo.salesforce.contact.SalesforceUpsertContactComponent in project camel by apache.

the class SalesforceUpsertContactConnectorAutoConfiguration method configureSalesforceUpsertContactComponent.

@Lazy
@Bean(name = "salesforce-upsert-contact-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(org.foo.salesforce.contact.SalesforceUpsertContactComponent.class)
public SalesforceUpsertContactComponent configureSalesforceUpsertContactComponent(CamelContext camelContext, SalesforceUpsertContactConnectorConfiguration configuration) throws Exception {
    SalesforceUpsertContactComponent connector = new SalesforceUpsertContactComponent();
    connector.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null, false);
    IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), connector, parameters);
    connector.setComponentOptions(parameters);
    return connector;
}
Also used : HashMap(java.util.HashMap) SalesforceUpsertContactComponent(org.foo.salesforce.contact.SalesforceUpsertContactComponent) Lazy(org.springframework.context.annotation.Lazy) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnClass(org.springframework.boot.autoconfigure.condition.ConditionalOnClass) ConditionalOnBean(org.springframework.boot.autoconfigure.condition.ConditionalOnBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

HashMap (java.util.HashMap)1 SalesforceUpsertContactComponent (org.foo.salesforce.contact.SalesforceUpsertContactComponent)1 ConditionalOnBean (org.springframework.boot.autoconfigure.condition.ConditionalOnBean)1 ConditionalOnClass (org.springframework.boot.autoconfigure.condition.ConditionalOnClass)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 Bean (org.springframework.context.annotation.Bean)1 Lazy (org.springframework.context.annotation.Lazy)1