Commit Graph
204 Commits
Author SHA1 Message Date
Jacopo Cappellato eb6d01b066 New implementation of the two-way cryptographic services of OFBiz based on Apache Shiro:
* two-way encryption is now delegated to Apache Shiro, with stronger initialization vectors
* the mechanism is backward compatible
* new tools to update the encryption of private keys, useful to upgrade older versions of OFBiz and most of all to replace old keys with new ones (this is critical to implement stronger security practices as requested by PCI) 
* unit tests



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1684608 13f79535-47bb-0310-9956-ffa450edef68
2015-06-10 09:01:30 +00:00
Nicolas Malin 7d94967a68 Convert javolution FastMap, FastSet and FastList by standard java.util.*
Related to OFBIZ-5781 Convert Javolution collections into Java collections
Thanks to Deepak Dixit and Adrian Crum for their help.

By defautl converted :
 * FastMap by HashMap
 * FastList by LinkedList
 * FastSet by HashSet

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1672752 13f79535-47bb-0310-9956-ffa450edef68
2015-04-10 20:22:54 +00:00
Adrian Crum f315f0d5be Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1669537 13f79535-47bb-0310-9956-ffa450edef68
2015-03-27 10:04:14 +00:00
Jacques Le Roux b8ca5543c9 Changes in all labels files: <value xml:lang="(.*)_(.*)"> to <value xml:lang="$1-$2">
Changes also listLocales.ftl to show dashes rather than underscores

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1650880 13f79535-47bb-0310-9956-ffa450edef68
2015-01-11 09:59:32 +00:00
Adrian Crum 91feff5f51 Updated the UI label files so they reference a schema.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649666 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 21:24:18 +00:00
Ashish Vijaywargiya 039f0608bc Applied framework related patch from jira issue - OFBIZ-5844 - Convert java files to EntityQuery.
Thanks Arun for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1646212 13f79535-47bb-0310-9956-ffa450edef68
2014-12-17 12:13:46 +00:00
Jacopo Cappellato 0e449a6874 Fixed issue happening during ./ant create-tenant target on some databases (e.g. MySQL) where milliseconds are not stored: the order in which the Component records were selected could be different from the order they were inserted, causing some data loading issues.
Also fixed some commented out code.
Thanks to Rohit Kaushal for the initial version of the patch and to Arun Patidar for the review and support.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1641804 13f79535-47bb-0310-9956-ffa450edef68
2014-11-26 13:09:40 +00:00
Jacques Le Roux 682c9014a2 Fixes and completes r1640588 and more minor things which were left after the change from run-install to load-demo
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1640727 13f79535-47bb-0310-9956-ffa450edef68
2014-11-20 12:18:59 +00:00
Jacques Le Roux d6c2d35d34 Inconsistencies related to the "java -jar ofbiz.jar" commands when used with arguments https://issues.apache.org/jira/browse/OFBIZ-5872
The help gives you:
c:\projectsASF\ofbiz>java -jar ofbiz.jar -help

Usage: java -jar ofbiz.jar [command] [arguments]
-both    -----> Run simultaneously the POS (Point of Sales) application and OFBiz standard
-help, -? ----> This screen
-install -----> Run install (create tables/load data)
-pos     -----> Run the POS (Point of Sales) application
-setup -------> Run external application server setup
-start -------> Start the server
-status ------> Status of the server
-shutdown ----> Shutdown the server
-test --------> Run the JUnit test script
[no config] --> Use default config
[no command] -> Start the server w/ default config

But actually only the -help, -status and -shutdown command need a dash. 

For now we decided to change the documentation generated by the help command to remove dashes when they are not needed.

To change 
-install -----> Run install (create tables/load data)
by
-load-data -----> Create tables/load data

To comment out the 
-setup -------> Run external application server setup
line

When done, we will try to have things consistent and re-add the missing dashes to the commands and in the help. Then the "Technical production setup guide" should be updated, pfew...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1640588 13f79535-47bb-0310-9956-ffa450edef68
2014-11-19 16:27:49 +00:00
Adrian Crum c039bb0330 Remove Javolution from the entityext component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635906 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 09:31:06 +00:00
Scott Gray 44e2c4fda1 Regex search/replace for delegator.findOne() to EntityQuery.queryOne()
Apologies for the large commit.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635383 13f79535-47bb-0310-9956-ffa450edef68
2014-10-30 04:18:05 +00:00
Scott Gray 13383b8abb Fix dead code warning by moving null check to the correct spot
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1631018 13f79535-47bb-0310-9956-ffa450edef68
2014-10-11 04:48:12 +00:00
Jacques Le Roux 3b118d4842 An excerpt of a patch from Nick Ho for "Add/Revise Traditional Chinese (zh-TW) translations" https://issues.apache.org/jira/browse/OFBIZ-5764
added/revised zh-TW translations in the framework, applications and specialpurpose folders to have consistent, commonly-used meaningful terms in Traditional Chinese.

jleroux: from Nick Ho's patch I have extracted only the Chinese changes, w/o the proposed  dash to underscore changes
This contains notably this 14 "zh" (not "sh-TW") changes:
<value xml:lang="zh">人将由电子邮件接受一个临时密码。</value><!-- was 客户将通过电子邮件收到一个临时密码。 -->
<value xml:lang="zh">合计属于公司: </value>
<value xml:lang="zh"> 完整文本:${fullText}</value>
<value xml:lang="zh">供货商佣金百分比</value>
<value xml:lang="zh">文本大小</value>
<value xml:lang="zh">值</value>
<value xml:lang="zh">算子</value>
<value xml:lang="zh">不能转移已序列化的库存。</value>
<value xml:lang="zh">货运收据</value>
<value xml:lang="zh">获取标识为 ${productStoreShipMethId} 的产品店铺送货方法(ProductStoreShipmentMeth)时出错:${errorString}</value>
<value xml:lang="zh">中国人民币元</value>
<value xml:lang="zh">如果选择"specify other",下拉框旁边会出现文本框。参考form的drop-down元素的other-field-size属性说明</value>
<value xml:lang="zh">文本消息</value>
<value xml:lang="zh">能够收到和解析XML消息,但是BSR->NOUN(买卖关系->名词) ${bsrNoun} 和/或 BSR->VERB(买卖关系->动词) ${bsrVerb} 是空的</value>
I have no competency to judge these changes, but from previous Shi Jinghai's feedback I believe there are OK

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1625816 13f79535-47bb-0310-9956-ffa450edef68
2014-09-17 20:44:07 +00:00
Jacopo Cappellato 2aab9001fc Removed some trivial padding for info messages at startup that required the usage of an external (freemarker) util class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621820 13f79535-47bb-0310-9956-ffa450edef68
2014-09-01 15:03:25 +00:00
Jacques Le Roux 425ce1c003 A patch from Nick Ho for "Add/Revise Traditional Chinese (zh-TW) translations in framework" https://issues.apache.org/jira/browse/OFBIZ-5737
more added/updated translations patch files for zh-TW locale

jleroux: 
I added the label
<value xml:lang="zh_TW">服務執行程式拋出一個異常</value>
by hand
Only 1 label was not added:
<value xml:lang="zh_TW">代號</value>
Because of the fuzziness and presence of several possibilities


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1621688 13f79535-47bb-0310-9956-ffa450edef68
2014-09-01 06:51:33 +00:00
Jacopo Cappellato c00fc92699 Merged framework-api-cleanup branch into trunk.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620538 13f79535-47bb-0310-9956-ffa450edef68
2014-08-26 09:16:52 +00:00
Adrian Crum c63cb8c89e Better encapsulation of entity engine multitenant setting.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1620120 13f79535-47bb-0310-9956-ffa450edef68
2014-08-24 10:27:24 +00:00
Christian Geisert e8402b8164 OFBIZ-5514 correct calculation of seconds (instead of minutes) in EntitySyncServices.cleanSyncRemoveInfo(). Thanks to Roberto Benítez Monje for reporting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1619098 13f79535-47bb-0310-9956-ffa450edef68
2014-08-20 13:28:06 +00:00
Adam Heath 647513604b Initialize the eca handler's DispatchContext asynchronously. This means
the eca handler will be available sooner, but might briefly pause the
first time it is used, while it waits for the DispatchContext to finish
initializing.

This patch is needed to prevent a deadlock when the eca handler itself
is initialized asynchronously in the delegator; see the next commit.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617812 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:24 +00:00
Adam Heath 2aaa234042 Add a global fork-join thread pool, and switch a bunch of stuff over to
it.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1617809 13f79535-47bb-0310-9956-ffa450edef68
2014-08-13 19:38:01 +00:00
Jacopo Cappellato 37d586c160 Converted some startup messages from "important" to "info".
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1616431 13f79535-47bb-0310-9956-ffa450edef68
2014-08-07 07:52:23 +00:00
Jacopo Cappellato 1ea8fe79b2 Fixes for a bug reported by Pierre Smits in OFBIZ-4130 (and OFBIZ-5319): a tenant user can access, via the delegator, the meta data information of other tenants; for example a tenant user with grants to use the Webtools application could view/edit the database details of all tenants.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1589589 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 05:19:13 +00:00
Jacques Le Roux 2f430df170 While at it (OFBIZ-4953), considering the current effort to remove Javolution use when possible, I have replaced few
FastList.<EntityExpr>newInstance(); 
by 
  new ArrayList<EntityExpr>();



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1573647 13f79535-47bb-0310-9956-ffa450edef68
2014-03-03 18:13:20 +00:00
Adrian Crum 0711522378 Fixed a bug in EntityDataLoadContainer.java - do not use System.exit, throw an exception instead. Also moved help text to the exception message because it was not being logged before shutdown.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542495 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 12:26:16 +00:00
Adrian Crum b34da96480 FIXME comments, no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1542463 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 04:21:39 +00:00
Jacques Le Roux c8ce55ecc9 A patch from Anahita Goljahani for Fixed mispelling of "occurred" https://issues.apache.org/jira/browse/OFBIZ-5342
jleroux: this includes a safe change in jquery.validate.js and jquery.validate.min.js

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530341 13f79535-47bb-0310-9956-ffa450edef68
2013-10-08 16:35:40 +00:00
Adrian Crum 18b5135a31 Third pass at removing cached DOM tree code from EntityConfigUtil.java. I converted some of the code to use the new thread-safe models.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490938 13f79535-47bb-0310-9956-ffa450edef68
2013-06-08 09:34:47 +00:00
Adrian Crum 964a1d956d Second pass at removing cached DOM tree code from EntityConfigUtil.java. I converted some of the code to use the new thread-safe models.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490678 13f79535-47bb-0310-9956-ffa450edef68
2013-06-07 15:18:27 +00:00
Adrian Crum 934d162622 Small fixup for EntityEcaCondition.java accessor method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447638 13f79535-47bb-0310-9956-ffa450edef68
2013-02-19 09:02:24 +00:00
Adrian Crum 88d0052633 Small fixup for my previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447114 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 01:13:10 +00:00
Adrian Crum 4ec75ee3c7 Small enhancements to Entity ECA classes: improve thread safety, eliminate null checks on fields that are never null, add some accessor methods, small code cleanups.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447112 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 01:03:58 +00:00
Adrian Crum b0014ab3f6 Small enhancements to EntityEcaRule.java: parse <eca> element only once, improve thread safety, add some accessor methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447108 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 00:10:25 +00:00
Adrian Crum 6dec952bc7 EntityEcaSetField.java bug fixes: test for null on field that was never null, not thread-safe.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1447107 13f79535-47bb-0310-9956-ffa450edef68
2013-02-18 00:01:52 +00:00
Jacques Le Roux 76da9bea54 A patch from Shi Jinghai for "Chinese localizations (zh) for trunk" https://issues.apache.org/jira/browse/OFBIZ-5134
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1446849 13f79535-47bb-0310-9956-ffa450edef68
2013-02-16 08:08:38 +00:00
Scott Gray 206d159601 Avoid potential NPE
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1400574 13f79535-47bb-0310-9956-ffa450edef68
2012-10-21 05:09:46 +00:00
Erwan de Ferrieres a41366e95f as suggested by Adrian, replacing @see by @Override in commit 1367751
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1369357 13f79535-47bb-0310-9956-ffa450edef68
2012-08-04 16:15:36 +00:00
Erwan de Ferrieres 6f363f4480 updating javadoc for Container#init
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1367751 13f79535-47bb-0310-9956-ffa450edef68
2012-07-31 20:25:26 +00:00
Jacopo Cappellato 955ae9eee1 A rather important refactoring of service related code:
* new factory interface for LocalDispatcher objects
* new factory implementation of GenericDispatcher
* new ServiceContainer container that initializes the factory (based on a configuration parameter)
* moved the getLocalDispatcher method out of GenericDispatcher and refactored (in a thread safe way) into ServiceContainer/GenericDispatcherFactory
* ServiceContainer also maintains the cache of LocalDispatchers that was managed by GenericDispatcher
* added code to ServiceContainer to deregister LocalDispatchers at shutdown: this finally fix the current code that was broken because the thread pool maintained by the JobPoller was never closed because of an issue with LocalDispatchers not being deregistered when not started by the ContextFilter
* change all code to call the ServiceContainer rather than GenericContainer to get a LocalDispatcher: now the implementation is no more directly referenced by calling code


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364952 13f79535-47bb-0310-9956-ffa450edef68
2012-07-24 09:16:26 +00:00
Jacopo Cappellato ea54b4ff18 Added new getName method to the Container interface and to all the implementations; added info messages to inform when containers are started/stopped.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1355854 13f79535-47bb-0310-9956-ffa450edef68
2012-07-01 07:32:07 +00:00
Jacopo Cappellato c386b7fc9a Added new "name" argument to the "init" method of the Component interface: now the name of the container (set by the xml attribute container.name) is passed to the init method and it is used to retrieve the container's configuration; before of this the container's name was hardcoded preventing the ability to define (and load) two containers (with different settings) of the same type.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1355652 13f79535-47bb-0310-9956-ffa450edef68
2012-06-30 06:32:00 +00:00
Jacopo Cappellato 068430fb8b Moved a few container definitions from the base/config/*-containers.xml files to their own component's ofbiz-component.xml file; this is a demonstration of the usage of the new ability to define component level containers; this is still experimental and there is room for improvements (and I am working on them and going to discuss a few details in the dev list) but this should already give a good idea of how we can remove redundancy from the various *-containers.xml files, remove dependencies between framework components and make the components self deployable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1355466 13f79535-47bb-0310-9956-ffa450edef68
2012-06-29 16:43:51 +00:00
Hans Bakker bd16dfb598 split up securitypermissions as seed data and securitygroups as demo data with a single exception: the creation of a super security group which has general access to the system and which is used with the 'ant create-admin-user-login' command.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1352431 13f79535-47bb-0310-9956-ffa450edef68
2012-06-21 07:21:49 +00:00
Hans Bakker 14f4e5a292 reverted recent security file changes revisions: 1350847,1350843,1350840,1348534,1347908,1347213,1346264, need more investigation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1351206 13f79535-47bb-0310-9956-ffa450edef68
2012-06-18 04:36:20 +00:00
Hans Bakker fff7f99081 introduced a new data-reader : 'security'
Security is now by default not loaded because not part of seed anymore this will make all component hidden and not accessible .
It is still loaded as part of the reader 'demo'

to load the security files:
./ant load-readers -Ddata-readers=security

Now it is possible to load only a selection of the security files in your hot-deploy component as follows:

<entity-resource type=data reader-name=seed loader=main location=../../framework/security/data/SecurityData.xml/>
<entity-resource type=data reader-name=seed loader=main location=../../framework/webtools/data/WebtoolsSecurityData.xml/>
<entity-resource type=data reader-name=seed loader=main location=../../applications/party/data/PartySecurityData.xml/>

This will enable only standard groups, the party and the webtools application.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1346255 13f79535-47bb-0310-9956-ffa450edef68
2012-06-05 06:37:06 +00:00
Jacopo Cappellato 9fe920a3f7 Improved code that manages the cache:
* removed unnecessary synchronization
* protected the UtilCache object (static field) by making it private and final
* replaced non atomic containsKey+put+get with get + putIfAbsentAndGet
* replaced containsKey + null check + get with get + null check



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343692 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 12:10:54 +00:00
Adam Heath 83d37a796b DEPRECATION: framework: GenericValue.getRelated/getRelatedCache variants replaced with a single getRelated variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343509 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:17:17 +00:00
Adam Heath 1aa422773b DEPRECATION: framework: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343478 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:11:19 +00:00
Adam Heath 9e5f405a4d DEPRECATION: framework: findByAnd variants replaced with findByAnd that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338403 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 20:59:54 +00:00
Adam Heath 64a9662c25 DEPRECATION: framework: findByPrimaryKey variants replaced with findOne
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337662 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 21:17:55 +00:00
Erwan de Ferrieres 8e0642a575 Adding consistency in log messages, 3 chars between square brackets
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337462 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 07:39:56 +00:00