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


Java ComponentConfig.getComponentConfig方法代码示例

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


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

示例1: getSolrWebappInfo

import org.ofbiz.base.component.ComponentConfig; //导入方法依赖的package包/类
public static WebappInfo getSolrWebappInfo() {
    WebappInfo solrApp = null;
    try {
        ComponentConfig cc = ComponentConfig.getComponentConfig("solr");
        for(WebappInfo currApp : cc.getWebappInfos()) {
            if ("solr".equals(currApp.getName())) {
                solrApp = currApp;
                break;
            }
        }
    }
    catch(ComponentException e) {
        throw new IllegalStateException(e);
    }
    return solrApp;
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:17,代码来源:SolrUtil.java

示例2: loadComponentFromConfig

import org.ofbiz.base.component.ComponentConfig; //导入方法依赖的package包/类
private void loadComponentFromConfig(String parentPath, ComponentLoaderConfig.ComponentDef def) {
    String location;
    if (def.location.startsWith("/")) {
        location = def.location;
    } else {
        location = parentPath + "/" + def.location;
    }
    if (def.type == ComponentLoaderConfig.SINGLE_COMPONENT) {
        ComponentConfig config = null;
        try {
            config = ComponentConfig.getComponentConfig(def.name, location);
            if (UtilValidate.isEmpty(def.name)) {
                def.name = config.getGlobalName();
            }
        } catch (ComponentException e) {
            Debug.logError("Cannot load component : " + def.name + " @ " + def.location + " : " + e.getMessage(), module);
        }
        if (config == null) {
            Debug.logError("Cannot load component : " + def.name + " @ " + def.location, module);
        } else {
            this.loadComponent(config);
        }
    } else if (def.type == ComponentLoaderConfig.COMPONENT_DIRECTORY) {
        this.loadComponentDirectory(location);
    }
}
 
开发者ID:gildaslemoal,项目名称:elpi,代码行数:27,代码来源:ComponentContainer.java

示例3: loadComponentFromConfig

import org.ofbiz.base.component.ComponentConfig; //导入方法依赖的package包/类
private void loadComponentFromConfig(String parentPath, ComponentLoaderConfig.ComponentDef def, boolean explicitOrder, List<ComponentConfig> componentList) {
    String location;
    if (def.location.startsWith("/")) {
        location = def.location;
    } else {
        location = parentPath + "/" + def.location;
    }
    if (def.type == ComponentLoaderConfig.SINGLE_COMPONENT) {
        ComponentConfig config = null;
        try {
            config = ComponentConfig.getComponentConfig(def.name, location);
            if (UtilValidate.isEmpty(def.name)) {
                def.name = config.getGlobalName();
            }
        } catch (ComponentException e) {
            Debug.logError("Cannot load component : " + def.name + " @ " + def.location + " : " + e.getMessage(), module);
        }
        if (config == null) {
            Debug.logError("Cannot load component : " + def.name + " @ " + def.location, module);
        } else {
            this.loadComponent(config);
        }
        // SCIPIO
        componentList.add(config);
    } else if (def.type == ComponentLoaderConfig.COMPONENT_DIRECTORY) {
        this.loadComponentDirectory(location, explicitOrder, componentList);
    }
}
 
开发者ID:ilscipio,项目名称:scipio-erp,代码行数:29,代码来源:ComponentContainer.java


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