本文整理汇总了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;
}
示例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);
}
}
示例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);
}
}