- 浏览: 87801 次
- 性别:
- 来自: 济南
最新评论
-
成大大的:
OFBiz电商实战百度网盘下载:http://pan.baid ...
ofbiz初级--安装与配置 -
feilian09:
...
如何将org.w3c.dom.Element xml节点对象转化成XML格式的string字符串 -
我改名了:
个人感觉本文 关于 内存碎片 的说法是不准确甚至是错误的 。而 ...
java 内存溢出 -
我改名了:
我很悲剧,发个博客, 连炸 弹两个字都不让发。难道也要实行文字 ...
java 内存溢出 -
liuqiang5151:
受用了,很好的总结。
ofbiz之entity 实体解析
1:根据delegator 获取 LocalDispatcher
LocalDispatcher thisDispatcher = GenericDispatcher.getLocalDispatcher(delegator.getDelegatorName(), delegator);
2:根据dispatcher 获取 DispatcherContext
DispatchContext dctx =
dispatcher.getDispatchContext();
3:获取一个GenericValue对象的所有字段
GenericDelegator delegator = DelegatorFactory.getDelegator("default");
GenericValue tmp = delegator.makeValue("UserLogin");
String entityName = tmp.getEntityName();
ModelEntity entity = delegator.getModelEntity(entityName);
List fieldNameList = entity.getAllFieldNames();
4:----
ServiceDispatcher sd = ServiceDispatcher.getInstance(dispatcherName, delegator);
LocalDispatcher dispatcher = sd.getLocalDispatcher(dispatcherName);
dispatcher = new GenericDispatcher(dispatcherName, delegator, readerURLs, loader, sd);
DispatchContext dc = new DispatchContext(name, readerURLs, loader, null);
5:ofbiz URL
URL formFileUrl = FlexibleLocation.resolveLocation(resourceName);
resourceName:component://common/widget/LookupForms.xml
formFileUrl:file:/E:/workspace/cpsp20110819/framework/common/widget/LookupForms.xml
for (File screenFile: screenFiles) {
String screenFilePath = screenFile.getAbsolutePath();
screenFilePath = screenFilePath.replace('\\', '/');
String screenFileRelativePath = screenFilePath.substring(rootComponentPath.length());
String screenLocation = "component://" + componentName + "/" + screenFileRelativePath;
Set<String> groupNames = getModelGroupReader().getGroupNames(delegatorBaseName);
for (String groupName: groupNames) {
GenericHelperInfo helperInfo = this.getGroupHelperInfo(groupName);
String helperBaseName = helperInfo.getHelperBaseName();
if (Debug.infoOn()) Debug.logInfo("Delegator \"" + delegatorFullName + "\" initializing helper \"" +
helperBaseName + "\" for entity group \"" + groupName + "\".", module);
if (UtilValidate.isNotEmpty(helperInfo.getHelperFullName())) {
// pre-load field type defs, the return value is ignored
ModelFieldTypeReader.getModelFieldTypeReader(helperBaseName);
// get the helper and if configured, do the datasource check
GenericHelper helper = GenericHelperFactory.getHelper(helperInfo);
DatasourceInfo datasourceInfo = EntityConfigUtil.getDatasourceInfo(helperBaseName);
if (datasourceInfo.checkOnStart) {
if (Debug.infoOn()) Debug.logInfo("Doing database check as requested in entityengine.xml with addMissing=" + datasourceInfo.addMissingOnStart, module);
try {
helper.checkDataSource(this.getModelEntityMapByGroup(groupName), null, datasourceInfo.addMissingOnStart);
} catch (GenericEntityException e) {
Debug.logWarning(e, e.getMessage(), module);
}
}
}
}
6: 获取所有实体名称
Set<String> entitys = delegator.getModelReader().getEntityNames();
entityArr = delegator.getModelReader().getEntityNames().toArray(new String[entitys.size()]);
7:清除实体缓存
Cache entityCache = delegator.getCache();
entityCache.remove(entityName);
8 : xml 中取${}值
FlexibleStringExpander fse = FlexibleStringExpander.getInstance(expression);
return fse.expandString(context, timeZone, locale);
9: xml 获取多个 不同节点
Set<String> nameSet = UtilMisc.toSet("set", "action","log");
for (Element actionOrSetElementOrLog : UtilXml.childElementList(eca, nameSet)) {
10 : String 类型xml 与 Map 互相转换
XmlSerializer.deserialize
XmlSerializer.serialize
11:类型转化类的加载
Iterator<ConverterLoader> converterLoaders = ServiceLoader.load(ConverterLoader.class, loader).iterator();
Collections.unmodifiableList
getStrElems
12: private void initEngines(final ClassLoader loader) {
Iterator itr = null;
try {
if (loader != null) {
itr = Service.providers(ScriptEngineFactory.class, loader);
} else {
itr = Service.installedProviders(ScriptEngineFactory.class);
}
}
13: Map<String, ConditionalFactory<?>> factories = new HashMap<String, ConditionalFactory<?>>();
Iterator<ConditionalFactory<?>> it = UtilGenerics.cast(ServiceLoader.load(ConditionalFactory.class, ConditionalFactory.class.getClassLoader()).iterator());
while (it.hasNext()) {
ConditionalFactory<?> factory = it.next();
factories.put(factory.getName(), factory);
}
conditionalFactories = Collections.unmodifiableMap(factories);
发表评论
-
转自飘飘的OFBIZ成神之路
2017-07-21 16:59 1280说在前面: 本文内容密集, 信息量超大, 请自备脑洞空间, ... -
并发控制
2014-10-24 18:44 1046并发控制 1. 并发冲突 当两个进程试图在同一 ... -
Java更新XML的四种常用方法简介
2013-12-10 11:57 989本文简要的讨论了Java语言编程中更新XML文档的四种常用方 ... -
java Thread start() 特性
2013-03-25 11:06 1054写了两个简单的类。本来写这两个类的初衷是为了 验证 log ... -
ofbiz 事务漏洞之一
2012-11-28 23:24 582今天又仔细看了下ofbiz 服务引擎的事务 。发现了一些问题 ... -
ofbiz ant run-install 常用命令使用指南
2012-10-26 16:40 3172<!--StartFragment --> an ... -
ofibz 表达式 判断为null
2012-09-28 16:42 0String expr1 = "${flag== ... -
ofbiz 框架中表达式用法和区别
2012-08-23 15:13 1687ofbiz 中表达式的使用主要有两个类 。FlexibleS ... -
OOM
2012-05-28 18:35 0jconsole 启动远程监控-Djava.rmi.serve ... -
ofbiz cache 以及陷阱
2012-03-13 20:41 0设法似的大是大非 -
ofbiz11.04 eca 中 set 操作的BUG
2012-03-07 11:29 2069近日又发现了一个ofbiz 1 ... -
itext 生成 pdf
2011-11-07 09:45 0public static String testPDFDo ... -
ofbiz之jobSandbox 调度详解
2011-09-27 16:49 0待写 : -
ofbiz 之部署常见错误集锦
2011-09-27 17:05 3146本文以ofbiz 11.04 为蓝本: 1: 错误描 ... -
ofbiz之fop 中文问题
2011-09-17 19:41 0java -classpath framework\base\ ... -
使用jxl.jar 生成EXCEL 并下载
2011-09-07 17:42 0先留个空先。没时间完善。 -
使用xml指定样式模板在txt中打印table 数据表格
2011-09-07 17:11 14741: 首先展示下效果 2:存在的坑。 2.1 :r ... -
ofbiz 之 jobSandbox 调度应用
2011-08-24 20:58 2491如果想在java程序中添加一条jobSandbox调度的话可以 ... -
ofbiz之entity 实体解析
2011-07-25 20:56 8200ofbiz 之entity实体 1. 实体定义文件 实体定义文 ... -
ofbiz 之 service eca
2011-07-25 20:54 4090ofbiz 之service eca 1. 定义文件位置 ...
相关推荐
还在为找不到ofbiz开发文档而烦恼吗?
OFBiz API中文版.chw
OFBiz API 文档,英文html版。使用官方资源中的ant命令自动生成,无任何修改。有兴趣的朋友可以自己生成,ant命令是:docs-all,该命令生成帮助文档时会获取操作系统语言设置,要生成英文文档请先将操作系统语言改为...
ofbiz API,学习ofbiz的朋友一定不能少
ofbiz_服务引擎,ofbiz中最为称道的部分
ofbiz入门图文讲解,包括入门helloworld 和使用ofbiz 新建实体 操作数据库对实体增删改查
ofbiz API——ofbiz 开发必备
OFBiz是一个非常著名的电子商务平台,是一个非常著名的开源项目,提供了创建基于最新J2EE/XML规范和技术标准,构建大中型企业级、跨平台、跨数据库、跨...包括实体引擎, 服务引擎, 消息引擎, 工作流引擎, 规则引擎等。
ofbiz服务,通过给controller增加事件来调用服务,也可以在方法内调用服务
适合ofbiz新手入门学习,ofbiz的环境搭建,api的查阅...开发中的参考
不多说了, 就是搭建
OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门OFBIZ快速入门
OFBiz API中文版.rar Apache OFBiz Cookbook Sep 2010.rar Opentaps widget使用说明.rar OFBiz.Development.2008.rar Groovy中文教程.rar freemarker中文手册.rar ofbiz10.04表结构.rar OFBiz开发指南.rar ...
Ofbiz的Lookup字段,讲解ofbiz辅助输入,包括文本,选择框,日期,时间,主从文本框。后面还介绍一下自定义修改的Lookup
基于spring封装的ofbiz所有服务,使用spring security进行安全验证,可以方便的发布为微服务,同时实现了一套直接使用ofbiz实体引擎操作ofbiz所有数据库表的spring应用框架设计
gradle ofbiz 16 开发环境搭建 2 Ofbiz中增加百度地图 8 使用entity-auto服务实现增加、修改、删除提示国际化 9 ...ofbiz实体引擎(九) 多租户 31 菜单权限配置 34 ofbiz权限判断语法整理 42 ofbiz 权限设计详解 43
Ofbiz(http://www.ofbiz.org) 是 Open Source 的商务软件系统,充分利用了各优秀的的Open Source 项目, 像 Tomcat, Ant, BeanShell, Jboss 等,构建了一个...Ofbiz 宣称的优点之一是用 很少的 Code 完成复杂的处理。
1、ofbiz 将其他的webservice 封装成服务,这时ofbiz的应用系统可以直接调用该服务,以访问其他的Webservice: 92 2、其他的soap客户端可以通过soap访问ofbiz,这时ofbiz相当于Webservice服务器 92 二、Soap应用例子...
OFBIZ的同一个表的不同字段之间的加减乘除等的计算公式