当前位置: 首页>>代码示例>>Java>>正文


Java ObjectHelper.isNotEmpty方法代码示例

本文整理汇总了Java中org.apache.camel.util.ObjectHelper.isNotEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectHelper.isNotEmpty方法的具体用法?Java ObjectHelper.isNotEmpty怎么用?Java ObjectHelper.isNotEmpty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.camel.util.ObjectHelper的用法示例。


在下文中一共展示了ObjectHelper.isNotEmpty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureHttpGetComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@Lazy
@Bean(name = "http-get-connector-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public HttpGetComponent configureHttpGetComponent() throws Exception {
    HttpGetComponent connector = new HttpGetComponent();
    connector.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    CamelPropertiesHelper.setCamelProperties(camelContext, connector,
            parameters, false);
    connector.setOptions(parameters);
    if (ObjectHelper.isNotEmpty(customizers)) {
        for (ConnectorCustomizer<HttpGetComponent> customizer : customizers) {
            boolean useCustomizer = (customizer instanceof HasId)
                    ? HierarchicalPropertiesEvaluator
                            .evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.http-get-connector.customizer",
                                    ((HasId) customizer).getId())
                    : HierarchicalPropertiesEvaluator
                            .evaluate(applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.http-get-connector.customizer");
            if (useCustomizer) {
                LOGGER.debug("Configure connector {}, with customizer {}",
                        connector, customizer);
                customizer.customize(connector);
            }
        }
    }
    return connector;
}
 
开发者ID:syndesisio,项目名称:connectors,代码行数:36,代码来源:HttpGetConnectorAutoConfiguration.java

示例2: configureSalesforceCreateSObjectComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@Lazy
@Bean(name = "salesforce-create-sobject-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceCreateSObjectComponent configureSalesforceCreateSObjectComponent()
        throws Exception {
    SalesforceCreateSObjectComponent connector = new SalesforceCreateSObjectComponent();
    connector.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    CamelPropertiesHelper.setCamelProperties(camelContext, connector,
            parameters, false);
    connector.setOptions(parameters);
    if (ObjectHelper.isNotEmpty(customizers)) {
        for (ConnectorCustomizer<SalesforceCreateSObjectComponent> customizer : customizers) {
            boolean useCustomizer = (customizer instanceof HasId)
                    ? HierarchicalPropertiesEvaluator
                            .evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-create-sobject.customizer",
                                    ((HasId) customizer).getId())
                    : HierarchicalPropertiesEvaluator
                            .evaluate(applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-create-sobject.customizer");
            if (useCustomizer) {
                LOGGER.debug("Configure connector {}, with customizer {}",
                        connector, customizer);
                customizer.customize(connector);
            }
        }
    }
    return connector;
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:37,代码来源:SalesforceCreateSObjectConnectorAutoConfiguration.java

示例3: configureSalesforceGetSObjectComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@Lazy
@Bean(name = "salesforce-get-sobject-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceGetSObjectComponent configureSalesforceGetSObjectComponent()
        throws Exception {
    SalesforceGetSObjectComponent connector = new SalesforceGetSObjectComponent();
    connector.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    CamelPropertiesHelper.setCamelProperties(camelContext, connector,
            parameters, false);
    connector.setOptions(parameters);
    if (ObjectHelper.isNotEmpty(customizers)) {
        for (ConnectorCustomizer<SalesforceGetSObjectComponent> customizer : customizers) {
            boolean useCustomizer = (customizer instanceof HasId)
                    ? HierarchicalPropertiesEvaluator
                            .evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-get-sobject.customizer",
                                    ((HasId) customizer).getId())
                    : HierarchicalPropertiesEvaluator
                            .evaluate(applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-get-sobject.customizer");
            if (useCustomizer) {
                LOGGER.debug("Configure connector {}, with customizer {}",
                        connector, customizer);
                customizer.customize(connector);
            }
        }
    }
    return connector;
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:37,代码来源:SalesforceGetSObjectConnectorAutoConfiguration.java

示例4: configureDayTradePlaceComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@Lazy
@Bean(name = "day-trade-place-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public DayTradePlaceComponent configureDayTradePlaceComponent()
        throws Exception {
    DayTradePlaceComponent connector = new DayTradePlaceComponent();
    connector.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    CamelPropertiesHelper.setCamelProperties(camelContext, connector,
            parameters, false);
    connector.setOptions(parameters);
    if (ObjectHelper.isNotEmpty(customizers)) {
        for (ConnectorCustomizer<DayTradePlaceComponent> customizer : customizers) {
            boolean useCustomizer = (customizer instanceof HasId)
                    ? HierarchicalPropertiesEvaluator.evaluate(
                            applicationContext.getEnvironment(),
                            "camel.connector.customizer",
                            "camel.connector.day-trade-place.customizer",
                            ((HasId) customizer).getId())
                    : HierarchicalPropertiesEvaluator.evaluate(
                            applicationContext.getEnvironment(),
                            "camel.connector.customizer",
                            "camel.connector.day-trade-place.customizer");
            if (useCustomizer) {
                LOGGER.debug("Configure connector {}, with customizer {}",
                        connector, customizer);
                customizer.customize(connector);
            }
        }
    }
    return connector;
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:36,代码来源:DayTradePlaceConnectorAutoConfiguration.java

示例5: configureSqlStoredConnectorComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@Lazy
@Bean(name = "sql-stored-connector-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SqlStoredConnectorComponent configureSqlStoredConnectorComponent()
        throws Exception {
    SqlStoredConnectorComponent connector = new SqlStoredConnectorComponent();
    connector.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    CamelPropertiesHelper.setCamelProperties(camelContext, connector,
            parameters, false);
    connector.setOptions(parameters);
    if (ObjectHelper.isNotEmpty(customizers)) {
        for (ConnectorCustomizer<SqlStoredConnectorComponent> customizer : customizers) {
            boolean useCustomizer = (customizer instanceof HasId)
                    ? HierarchicalPropertiesEvaluator
                            .evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.sql-stored-connector.customizer",
                                    ((HasId) customizer).getId())
                    : HierarchicalPropertiesEvaluator
                            .evaluate(applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.sql-stored-connector.customizer");
            if (useCustomizer) {
                LOGGER.debug("Configure connector {}, with customizer {}",
                        connector, customizer);
                customizer.customize(connector);
            }
        }
    }
    return connector;
}
 
开发者ID:syndesisio,项目名称:connectors,代码行数:37,代码来源:SqlStoredConnectorConnectorAutoConfiguration.java

示例6: configureSalesforceGetSObjectWithIdComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@Lazy
@Bean(name = "salesforce-get-sobject-with-id-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceGetSObjectWithIdComponent configureSalesforceGetSObjectWithIdComponent()
        throws Exception {
    SalesforceGetSObjectWithIdComponent connector = new SalesforceGetSObjectWithIdComponent();
    connector.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    CamelPropertiesHelper.setCamelProperties(camelContext, connector,
            parameters, false);
    connector.setOptions(parameters);
    if (ObjectHelper.isNotEmpty(customizers)) {
        for (ConnectorCustomizer<SalesforceGetSObjectWithIdComponent> customizer : customizers) {
            boolean useCustomizer = (customizer instanceof HasId)
                    ? HierarchicalPropertiesEvaluator
                            .evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-get-sobject-with-id.customizer",
                                    ((HasId) customizer).getId())
                    : HierarchicalPropertiesEvaluator
                            .evaluate(applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-get-sobject-with-id.customizer");
            if (useCustomizer) {
                LOGGER.debug("Configure connector {}, with customizer {}",
                        connector, customizer);
                customizer.customize(connector);
            }
        }
    }
    return connector;
}
 
开发者ID:syndesisio,项目名称:connectors,代码行数:37,代码来源:SalesforceGetSObjectWithIdConnectorAutoConfiguration.java

示例7: configureSalesforceUpdateSObjectComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@Lazy
@Bean(name = "salesforce-update-sobject-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceUpdateSObjectComponent configureSalesforceUpdateSObjectComponent()
        throws Exception {
    SalesforceUpdateSObjectComponent connector = new SalesforceUpdateSObjectComponent();
    connector.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    CamelPropertiesHelper.setCamelProperties(camelContext, connector,
            parameters, false);
    connector.setOptions(parameters);
    if (ObjectHelper.isNotEmpty(customizers)) {
        for (ConnectorCustomizer<SalesforceUpdateSObjectComponent> customizer : customizers) {
            boolean useCustomizer = (customizer instanceof HasId)
                    ? HierarchicalPropertiesEvaluator
                            .evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-update-sobject.customizer",
                                    ((HasId) customizer).getId())
                    : HierarchicalPropertiesEvaluator
                            .evaluate(applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-update-sobject.customizer");
            if (useCustomizer) {
                LOGGER.debug("Configure connector {}, with customizer {}",
                        connector, customizer);
                customizer.customize(connector);
            }
        }
    }
    return connector;
}
 
开发者ID:syndesisio,项目名称:connectors,代码行数:37,代码来源:SalesforceUpdateSObjectConnectorAutoConfiguration.java

示例8: configureSalesforceOnUpdateComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@Lazy
@Bean(name = "salesforce-on-update-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceOnUpdateComponent configureSalesforceOnUpdateComponent()
        throws Exception {
    SalesforceOnUpdateComponent connector = new SalesforceOnUpdateComponent();
    connector.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    CamelPropertiesHelper.setCamelProperties(camelContext, connector,
            parameters, false);
    connector.setOptions(parameters);
    if (ObjectHelper.isNotEmpty(customizers)) {
        for (ConnectorCustomizer<SalesforceOnUpdateComponent> customizer : customizers) {
            boolean useCustomizer = (customizer instanceof HasId)
                    ? HierarchicalPropertiesEvaluator
                            .evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-on-update.customizer",
                                    ((HasId) customizer).getId())
                    : HierarchicalPropertiesEvaluator
                            .evaluate(applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-on-update.customizer");
            if (useCustomizer) {
                LOGGER.debug("Configure connector {}, with customizer {}",
                        connector, customizer);
                customizer.customize(connector);
            }
        }
    }
    return connector;
}
 
开发者ID:syndesisio,项目名称:connectors,代码行数:37,代码来源:SalesforceOnUpdateConnectorAutoConfiguration.java

示例9: configureSalesforceOnDeleteComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@Lazy
@Bean(name = "salesforce-on-delete-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceOnDeleteComponent configureSalesforceOnDeleteComponent()
        throws Exception {
    SalesforceOnDeleteComponent connector = new SalesforceOnDeleteComponent();
    connector.setCamelContext(camelContext);
    Map<String, Object> parameters = new HashMap<>();
    IntrospectionSupport.getProperties(configuration, parameters, null,
            false);
    CamelPropertiesHelper.setCamelProperties(camelContext, connector,
            parameters, false);
    connector.setOptions(parameters);
    if (ObjectHelper.isNotEmpty(customizers)) {
        for (ConnectorCustomizer<SalesforceOnDeleteComponent> customizer : customizers) {
            boolean useCustomizer = (customizer instanceof HasId)
                    ? HierarchicalPropertiesEvaluator
                            .evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-on-delete.customizer",
                                    ((HasId) customizer).getId())
                    : HierarchicalPropertiesEvaluator
                            .evaluate(applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.salesforce-on-delete.customizer");
            if (useCustomizer) {
                LOGGER.debug("Configure connector {}, with customizer {}",
                        connector, customizer);
                customizer.customize(connector);
            }
        }
    }
    return connector;
}
 
开发者ID:syndesisio,项目名称:connectors,代码行数:37,代码来源:SalesforceOnDeleteConnectorAutoConfiguration.java

示例10: postConstructActiveMQSubscribeComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@PostConstruct
public void postConstructActiveMQSubscribeComponent() {
    Map<String, Object> parameters = new HashMap<>();
    for (Map.Entry<String, ActiveMQSubscribeConnectorConfigurationCommon> entry : configuration
            .getConfigurations().entrySet()) {
        parameters.clear();
        ActiveMQSubscribeComponent connector = new ActiveMQSubscribeComponent(
                entry.getKey());
        connector.setCamelContext(camelContext);
        try {
            IntrospectionSupport.getProperties(entry.getValue(),
                    parameters, null, false);
            CamelPropertiesHelper.setCamelProperties(camelContext,
                    connector, parameters, false);
            connector.setOptions(parameters);
            if (ObjectHelper.isNotEmpty(customizers)) {
                for (ConnectorCustomizer<ActiveMQSubscribeComponent> customizer : customizers) {
                    boolean useCustomizer = (customizer instanceof HasId)
                            ? HierarchicalPropertiesEvaluator.evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.activemq-subscribe."
                                            + entry.getKey()
                                            + ".customizer",
                                    ((HasId) customizer).getId())
                            : HierarchicalPropertiesEvaluator.evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.activemq-subscribe."
                                            + entry.getKey()
                                            + ".customizer");
                    if (useCustomizer) {
                        LOGGER.debug(
                                "Configure connector {}, with customizer {}",
                                connector, customizer);
                        customizer.customize(connector);
                    }
                }
            }
            camelContext.addComponent(entry.getKey(), connector);
        } catch (Exception e) {
            throw new BeanCreationException(entry.getKey(), e.getMessage(),
                    e);
        }
    }
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:47,代码来源:ActiveMQSubscribeConnectorAutoConfiguration.java

示例11: postConstructActiveMQPublishBytesComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@PostConstruct
public void postConstructActiveMQPublishBytesComponent() {
    Map<String, Object> parameters = new HashMap<>();
    for (Map.Entry<String, ActiveMQPublishBytesConnectorConfigurationCommon> entry : configuration
            .getConfigurations().entrySet()) {
        parameters.clear();
        ActiveMQPublishBytesComponent connector = new ActiveMQPublishBytesComponent();
        connector.setCamelContext(camelContext);
        try {
            IntrospectionSupport.getProperties(entry.getValue(),
                    parameters, null, false);
            CamelPropertiesHelper.setCamelProperties(camelContext,
                    connector, parameters, false);
            connector.setOptions(parameters);
            if (ObjectHelper.isNotEmpty(customizers)) {
                for (ConnectorCustomizer<ActiveMQPublishBytesComponent> customizer : customizers) {
                    boolean useCustomizer = (customizer instanceof HasId)
                            ? HierarchicalPropertiesEvaluator.evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.activemq-publish-bytes."
                                            + entry.getKey()
                                            + ".customizer",
                                    ((HasId) customizer).getId())
                            : HierarchicalPropertiesEvaluator.evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.activemq-publish-bytes."
                                            + entry.getKey()
                                            + ".customizer");
                    if (useCustomizer) {
                        LOGGER.debug(
                                "Configure connector {}, with customizer {}",
                                connector, customizer);
                        customizer.customize(connector);
                    }
                }
            }
            camelContext.addComponent(entry.getKey(), connector);
        } catch (Exception e) {
            throw new BeanCreationException(entry.getKey(), e.getMessage(),
                    e);
        }
    }
}
 
开发者ID:syndesisio,项目名称:connectors,代码行数:46,代码来源:ActiveMQPublishBytesConnectorAutoConfiguration.java

示例12: addRouteDefinitions

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@PostConstruct
public void addRouteDefinitions() throws Exception {
    if (ObjectHelper.isNotEmpty(definitions)) {
        context.addRouteDefinitions(definitions);
    }
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:7,代码来源:SyndesisExtensionCollectorAutoConfiguration.java

示例13: postConstructActiveMQPublishMapComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@PostConstruct
public void postConstructActiveMQPublishMapComponent() {
    Map<String, Object> parameters = new HashMap<>();
    for (Map.Entry<String, ActiveMQPublishMapConnectorConfigurationCommon> entry : configuration
            .getConfigurations().entrySet()) {
        parameters.clear();
        ActiveMQPublishMapComponent connector = new ActiveMQPublishMapComponent();
        connector.setCamelContext(camelContext);
        try {
            IntrospectionSupport.getProperties(entry.getValue(),
                    parameters, null, false);
            CamelPropertiesHelper.setCamelProperties(camelContext,
                    connector, parameters, false);
            connector.setOptions(parameters);
            if (ObjectHelper.isNotEmpty(customizers)) {
                for (ConnectorCustomizer<ActiveMQPublishMapComponent> customizer : customizers) {
                    boolean useCustomizer = (customizer instanceof HasId)
                            ? HierarchicalPropertiesEvaluator.evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.activemq-publish-map."
                                            + entry.getKey()
                                            + ".customizer",
                                    ((HasId) customizer).getId())
                            : HierarchicalPropertiesEvaluator.evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.activemq-publish-map."
                                            + entry.getKey()
                                            + ".customizer");
                    if (useCustomizer) {
                        LOGGER.debug(
                                "Configure connector {}, with customizer {}",
                                connector, customizer);
                        customizer.customize(connector);
                    }
                }
            }
            camelContext.addComponent(entry.getKey(), connector);
        } catch (Exception e) {
            throw new BeanCreationException(entry.getKey(), e.getMessage(),
                    e);
        }
    }
}
 
开发者ID:syndesisio,项目名称:connectors,代码行数:46,代码来源:ActiveMQPublishMapConnectorAutoConfiguration.java

示例14: postConstructTradeInsightTopComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@PostConstruct
public void postConstructTradeInsightTopComponent() {
    Map<String, Object> parameters = new HashMap<>();
    for (Map.Entry<String, TradeInsightTopConnectorConfigurationCommon> entry : configuration
            .getConfigurations().entrySet()) {
        parameters.clear();
        TradeInsightTopComponent connector = new TradeInsightTopComponent(
                entry.getKey());
        connector.setCamelContext(camelContext);
        try {
            IntrospectionSupport.getProperties(entry.getValue(),
                    parameters, null, false);
            CamelPropertiesHelper.setCamelProperties(camelContext,
                    connector, parameters, false);
            connector.setOptions(parameters);
            if (ObjectHelper.isNotEmpty(customizers)) {
                for (ConnectorCustomizer<TradeInsightTopComponent> customizer : customizers) {
                    boolean useCustomizer = (customizer instanceof HasId)
                            ? HierarchicalPropertiesEvaluator.evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.trade-insight-top."
                                            + entry.getKey()
                                            + ".customizer",
                                    ((HasId) customizer).getId())
                            : HierarchicalPropertiesEvaluator.evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.trade-insight-top."
                                            + entry.getKey()
                                            + ".customizer");
                    if (useCustomizer) {
                        LOGGER.debug(
                                "Configure connector {}, with customizer {}",
                                connector, customizer);
                        customizer.customize(connector);
                    }
                }
            }
            camelContext.addComponent(entry.getKey(), connector);
        } catch (Exception e) {
            throw new BeanCreationException(entry.getKey(), e.getMessage(),
                    e);
        }
    }
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:47,代码来源:TradeInsightTopConnectorAutoConfiguration.java

示例15: postConstructTradeInsightSellComponent

import org.apache.camel.util.ObjectHelper; //导入方法依赖的package包/类
@PostConstruct
public void postConstructTradeInsightSellComponent() {
    Map<String, Object> parameters = new HashMap<>();
    for (Map.Entry<String, TradeInsightSellConnectorConfigurationCommon> entry : configuration
            .getConfigurations().entrySet()) {
        parameters.clear();
        TradeInsightSellComponent connector = new TradeInsightSellComponent(
                entry.getKey());
        connector.setCamelContext(camelContext);
        try {
            IntrospectionSupport.getProperties(entry.getValue(),
                    parameters, null, false);
            CamelPropertiesHelper.setCamelProperties(camelContext,
                    connector, parameters, false);
            connector.setOptions(parameters);
            if (ObjectHelper.isNotEmpty(customizers)) {
                for (ConnectorCustomizer<TradeInsightSellComponent> customizer : customizers) {
                    boolean useCustomizer = (customizer instanceof HasId)
                            ? HierarchicalPropertiesEvaluator.evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.trade-insight-sell."
                                            + entry.getKey()
                                            + ".customizer",
                                    ((HasId) customizer).getId())
                            : HierarchicalPropertiesEvaluator.evaluate(
                                    applicationContext.getEnvironment(),
                                    "camel.connector.customizer",
                                    "camel.connector.trade-insight-sell."
                                            + entry.getKey()
                                            + ".customizer");
                    if (useCustomizer) {
                        LOGGER.debug(
                                "Configure connector {}, with customizer {}",
                                connector, customizer);
                        customizer.customize(connector);
                    }
                }
            }
            camelContext.addComponent(entry.getKey(), connector);
        } catch (Exception e) {
            throw new BeanCreationException(entry.getKey(), e.getMessage(),
                    e);
        }
    }
}
 
开发者ID:syndesisio,项目名称:syndesis,代码行数:47,代码来源:TradeInsightSellConnectorAutoConfiguration.java


注:本文中的org.apache.camel.util.ObjectHelper.isNotEmpty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。