Commit Graph
27737 Commits
Author SHA1 Message Date
Adam Heath 3779f5ef4f DEPRECATION: applications/commonext: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343480 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:11:53 +00:00
Adam Heath 7d2b0d9865 DEPRECATION: applications/accounting: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343479 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:11:43 +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 9e8ddebcac FEATURE: Add GenericValue.getRelatedOne that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343477 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:58 +00:00
Adam Heath 7cf7538567 Deprecate all Delegator.getRelatedOne/getRelatedOneCache, and add a
version that takes a cache parameter.

This commit finishes the Delegator.getRelatedOne set of changes; the
previous methods are now deprecated, and the new ones should be used
going forward.

Delegator.getRelatedOne(String, GenericValue) is replaced by
Delegator.getRelatedOne(String, GenericValue, boolean).

Delegator.getRelatedOneCache(String, GenericValue) is replaced by
Delegator.getRelatedOne(String, GenericValue, boolean).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343476 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:52 +00:00
Adam Heath 221b2c0312 FEATURE: Add Delegator.getRelatedOne variant that takes a boolean useCache parameter.
Rework internal GenericDelegator methods to call the new method, but no
other external classes directly call this new one yet.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343475 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:44 +00:00
Adam Heath 3482d929e7 OPTIMIZE: Replace Delegator.getRelatedOne calls with
GenericValue.getRelatedOne.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343474 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:37 +00:00
Adam Heath 2d512fd498 FORMATTING: Add final trailing newlines.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343473 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:28 +00:00
Adam Heath 91dcd099d5 OPTIMIZE: Join a few overly long split lines.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343472 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:10:11 +00:00
Adam Heath ce8e0a2c24 FIX: Found a local case of findByPrimaryKey usage.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343471 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:09:53 +00:00
Adam Heath eb4695bb96 FIX: Now that TransactionUtil.doNewTransaction is fixed to actually
work, back out the incorrect fix done in 1343088.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343470 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:55:11 +00:00
Adam Heath 1ba97a3210 FIX: This is the correct fix for 1343088;
TransactionUtil.doNewTransaction was starting a new transaction, then
immediately suspending it.  This caused confusion in calling code that
tried to use doNewTransaction.  Fortunately, this was not used very
much,

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343469 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:55:05 +00:00
Adam Heath a2d4b1b5e3 OPTIMIZE: Change return type of noTransaction(Callable) to
NoTransaction; it used to be Callable.  NoTransaction implements
Callable.  This change requires a recompile, but is otherwise
compatible with calling code.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343468 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:54:58 +00:00
Adam Heath b829aa5d60 FEATURE: Change NoTransaction.call() to throw GenericEntityException
instead of Exception.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343467 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:54:51 +00:00
Adam Heath d0e08314b3 FEATURE: Ignore many vim temp files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343466 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:54:44 +00:00
Hans Bakker 020dd28a4f improved 'load-tenant-data-readers' explanantion and removed confirmation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343458 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 03:11:01 +00:00
Jacopo Cappellato aa62961e63 Corrected param name in javadoc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343303 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 15:53:41 +00:00
Jacopo Cappellato 3eecd00954 Enhanced unit test for UtilCache.putIfAbsentAndGet method to better explain its behaviour: it returns the reference to the same object passed as argument only if the key was not already found in cache.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343291 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 15:39:02 +00:00
Jacopo Cappellato 247c205188 Improved code that manages the cache:
* replaced putIfAbsent + get with putIfAbsentAndGet to avoid the risk of a NPE if the cache entry is removed (or expired) between the two calls



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343287 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 15:32:28 +00:00
Jacopo Cappellato 074c282c0c Improved code that manages the cache:
* protected the UtilCache object (static field) by making it private and final
* instead of using the "put" method, use the "putIfAbsentAndGet" method to prevent the risk of adding the new value if another concurrent thread added it in the meantime



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343278 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 15:25:46 +00:00
Jacopo Cappellato 733bb64592 Improved code that manages the cache:
* removed unnecessary synchronization  
 * protected the UtilCache object (static field) by making it private and final


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343277 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 15:02:39 +00:00
Jacopo Cappellato ed9474669c Removed an unused UtilCache static field.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343273 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 14:51:32 +00:00
Jacopo Cappellato ee53c9452b Some cleanups and changes to logging configuration:
* some misc formatting and changes to comments
* removed the old and unused configuration for minerva
* added a new file appender for Tomcat where all Tomcat internal logging is now redirected 
* changed internal logging for FOP from info to warn to be consistent with the settings of other external components (Tomcat, Geronimo Transaction Manager, Freemarker)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343269 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 14:41:50 +00:00
Jacopo Cappellato 0fb93cc33b Removed a bunch of unused jars imported from the Tomcat distribution and replaced with the ones in the "Embedded" distribution.
For details about the upgrade process for future Tomcat releases see my notes:
  https://cwiki.apache.org/confluence/display/OFBTECH/How+to+upgrade+the+embedded+Tomcat


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343263 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 14:22:15 +00:00
Jacopo Cappellato 7c91aaa74f OFBIZ-4901 Upgraded icu4j from version 4.4 to version 49.1; thanks to Deepak Dixit for the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343261 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 14:05:29 +00:00
Adrian Crum 1002cfb510 Mini-language JavaDocs. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343174 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 09:30:49 +00:00
Jacopo Cappellato 95e8f72311 Removed some unnecessary ?exists statements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343158 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 08:04:35 +00:00
Jacopo Cappellato d0dd1897f3 Replaced "!= null" with "??" (that is a replacement for the deprecated "exists" built-in).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343156 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 07:36:41 +00:00
Jacques Le Roux 6075bed667 Missed this because I had some other changes pending
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343154 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 07:15:42 +00:00
Hans Bakker 20c8d5f282 foreign key name too long
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343122 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 01:15:16 +00:00
Jacques Le Roux 54555ad7b7 Fixes this error found by chance in log
---- exception report ----------------------------------------------------------
ERROR: Cannot do a find that returns an EntityListIterator with no transaction in place. Wrap this call in a transaction.
Exception: java.lang.Exception
Message: Stack Trace
---- stack trace ---------------------------------------------------------------
java.lang.Exception: Stack Trace
org.ofbiz.entity.GenericDelegator.find(GenericDelegator.java:1751)
org.ofbiz.order.order.OrderServices$1.call(OrderServices.java:5610)
org.ofbiz.order.order.OrderServices$1.call(OrderServices.java:5605)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343088 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 20:28:16 +00:00
Jacques Le Roux 55468331fa Closes "Move SHARK to Attic" https://issues.apache.org/jira/browse/OFBIZ-4795
These were missing in r1343064 (used * in Eclipse search, needed *.*)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343065 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 16:00:17 +00:00
Jacques Le Roux b48ff3a62c Closes "Move SHARK to Attic" https://issues.apache.org/jira/browse/OFBIZ-4795
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343064 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 15:47:32 +00:00
Jacques Le Roux 8d497b1bbf As ever, forgot .classpath in r1343038
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343040 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 12:44:13 +00:00
Jacques Le Roux 7730a12e22 Renames nekohtml.jar to nekohtml-1.9.7.jar (found in MANIFEST) see http://nekohtml.sourceforge.net/index.html
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343038 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 12:33:17 +00:00
Adrian Crum 28c894cd6f Overhauled Mini-language <find-by-and> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343035 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 12:06:41 +00:00
Jacques Le Roux baa73733d2 Where it shows that maintaining help is not that easy. Unlike Javadoc you don't have under eyes when changing things
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343030 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 10:41:13 +00:00
Jacques Le Roux 720578ecf3 Replaces all remaining title="${uiLabelMap.CommonEmptyHeader}" by title=" ", and specific case in ListPartyCommEvents
This closes the CommonEmptyHeader chapter

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343016 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 08:41:47 +00:00
Jacques Le Roux 88fb917e8f Adds the default port number in start-debug target description
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343010 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 07:38:28 +00:00
Jacques Le Roux fcdb9d5eaa Closes
1) "Deleted row in FilterOrderList.groovy"  https://issues.apache.org/jira/browse/OFBIZ-3431
2) "getOrders() in OrderListState does not work" https://issues.apache.org/jira/browse/OFBIZ-4883

As I had some doubt about the origin of the issues and wanted to check if they were real and would not hide something else or have side-effect, I did a complete historical review.

1) Could have been hidden using groovy safe navigation 
ie 
facilityId = orderHeader.originFacilityId ?: productStore?.inventoryFacilityId;
instead of
facilityId = orderHeader.originFacilityId ?: productStore.inventoryFacilityId;

But anyway it was wrong from the start when I introduced the feature  http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/filterorderlist.bsh?view=markup&pathrev=465376
(related to https://issues.apache.org/jira/browse/OFBIZ-644)
The facilityId  was useless. I remember I extracted it from a client specific feature and certainly forgot  to remove this part (useless at least in OFBiz code) when I merged with Leon's code.

2) Was Erwan wrong C/P or typo at http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/src/org/ofbiz/order/order/OrderListState.java?r1=1305309&r2=1305308&pathrev=1305309

Thanks to Chatree Srichart and Nils Pförtner for reports (actually I found OFBIZ-3431 by chance while working on the issue)

Still, David was against this feature when I introduced it. And I must say that almost 6 years later I tend to agree with him. I have since crossed the same kind of OO patterns written in OFBiz based application by good Java programmers. They breaks the "simple" ways used in OFBiz at the application level (of course not at the framework level where those patterns are useful) and often finish to be problems...

Quoting David:
<<In general I don't like the pattern used in this patch. It doesn't follow best practices or use the tools and patterns established in OFBiz to make all of our lives easier, during implementation but even more importantly during maintenance and customization. There are very good reasons we recommend using object oriented patterns written in Java on only very rare occasions. This is a good example of something that is not complex enough to justify, and it will be a maintenance problem in the future.>>

Anyway this code is there now, and it's actually not as simple to replace...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342980 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 22:13:01 +00:00
Jacques Le Roux 621a487c35 Closes "Logs not generating on linux" https://issues.apache.org/jira/browse/OFBIZ-4877
I removed log4j-over-slf4j from trunk at in order to have logs in official Trunk demo. THis is part of the JCR effort which should be removed from trunk anyway since Sascha recreated a new JCR branch. I let him handle the rest...

I guess [Bridging legacy APIs|http://www.slf4j.org/legacy.html] has not been followed in details 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342893 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 13:05:35 +00:00
Jacques Le Roux b03e96411f A completing patch from Pierre Smits "Complete Help screens in Manufacturing in NL language" https://issues.apache.org/jira/browse/OFBIZ-4898
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342875 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 10:09:03 +00:00
Jacques Le Roux e3e7491611 I just learned today that now for regions to be associated with a state a country needs a CountryAddressFormat. I guess this is related Sascha's changes for GBR (he introduced the GROUP_MEMBER notion), but I could be wrong
This fixes Swiss cantons wich now appears at https://localhost:8443/example/control/FormWidgetExamples#DropDownFieldsExampleForm_stateProvinceGeoId_title

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342874 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 10:03:04 +00:00
Jacques Le Roux 5f732182bd Forgot to save pending change in Eclipse, thanks to Adrian who noticed it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342871 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 09:35:02 +00:00
Adrian Crum 2bab33d7aa Overhauled Mini-language <filter-list-by-date> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342854 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 05:01:00 +00:00
Adrian Crum 1a05bb40cd Fixed a bug in an eCommerce Freemarker template - https://issues.apache.org/jira/browse/OFBIZ-4899.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342852 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 04:32:22 +00:00
Adrian Crum 19870304f9 Added a missing license header.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342850 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 04:11:41 +00:00
Jacques Le Roux 463be6851d Thanks to Martin Kaiser report on dev ML, cleans geo data a bit
Use Swiss geo data. To be consistent I have also renamed GeoData_CHE.xml to GeoData_CH.xml. 

While at it I also renamed GeoData_IRL.xml to GeoData_IE.xml , renamed things internally, and extracted the  North Ireland geo data from it to GeoData_UK.xml where it actually belongs


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342846 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 03:56:52 +00:00
Jacques Le Roux c62a93044a Forget to document the value option for redirect-parameter (not a big deal, pretty obvious, so I don't backport)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342567 13f79535-47bb-0310-9956-ffa450edef68
2012-05-25 10:47:00 +00:00
Jacopo Cappellato 8de34f3f44 Upgraded Ant from 1.8.3 to 1.8.4 and "Commons Compress" from 1.4 to 1.4.1 in order to protect the system from vulnerability reported in CVE-2012-2098: Apache Commons Compress and Apache Ant denial of service vulnerability.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342326 13f79535-47bb-0310-9956-ffa450edef68
2012-05-24 16:36:09 +00:00