Jacques Le Roux
e7905f2c8c
Fix the anti-pattern
...
if (* != null && *.size() > 0) {
where * is a variable name (String or Collection). Rewritten to
if (UtilValidate.isNotEmpty(*)) {
Done with Eclipse regex replace feature with
search = if \((\w+) *!= *null *&& *(\w+)\.size\(\) *> *0\) *\{
replace = if (UtilValidate.isNotEmpty($1)) {
And of course some hand-work for imports and cleaning. I compiled and tested with ant run-tests
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@686591 13f79535-47bb-0310-9956-ffa450edef68
2008-08-17 07:47:18 +00:00
Adam Heath
e410552cc9
No longer *copy* the extra support files into the classes dir;
...
instead, just add them straight to the final jar.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685934 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 15:08:14 +00:00
Adam Heath
8328cfc565
Don't make base/start subdirs in build/classes.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685783 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 06:16:19 +00:00
Adam Heath
2617681b51
Remove svn:executable on a bunch of stuff.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@684389 13f79535-47bb-0310-9956-ffa450edef68
2008-08-10 00:53:43 +00:00
Adam Heath
90426d4b6d
Split framework/base into framework/start; now all components have
...
exactly the same type of layout.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@684377 13f79535-47bb-0310-9956-ffa450edef68
2008-08-09 23:38:36 +00:00
Hans Bakker
0e16880a69
added buffer conversion which is required by the persistContentAndAssoc service to store email attachments
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@683752 13f79535-47bb-0310-9956-ffa450edef68
2008-08-07 23:42:38 +00:00
Jacopo Cappellato
853ed7f633
Formatting and code cleanups after last commit.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682657 13f79535-47bb-0310-9956-ffa450edef68
2008-08-05 09:54:05 +00:00
Jacques Le Roux
bfc0ea779c
A patch from Marco Ruocco solving an issue on Windows : File.separator in Windows system is "\", that is, also, the first character of an escape sequence. So the replaceAll method expects another char after that.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682652 13f79535-47bb-0310-9956-ffa450edef68
2008-08-05 09:36:52 +00:00
Adam Heath
99bf46f085
Switch most new File(string_with_path_separator) calls to
...
FileUtil.getFile.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682266 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 06:08:42 +00:00
Adam Heath
7ee96bdc1f
Utility methods that convert string file paths to File objects.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682261 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 05:47:26 +00:00
Adam Heath
60b7afc406
Add a variant of isValidDatabaseId that takes a StringBuilder.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682244 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 02:34:55 +00:00
Adam Heath
a4dcc6e653
getResourceBundleMap returns ResourceBundleMapWrapper instead of
...
Map<String, Object>; this way, callers don't have to explicitly
cast to the former when they need to.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682101 13f79535-47bb-0310-9956-ffa450edef68
2008-08-03 04:28:17 +00:00
Adam Heath
ac55d75925
Final set of generics markup for base; base no longer has any
...
'unchecked' warnings.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682096 13f79535-47bb-0310-9956-ffa450edef68
2008-08-03 02:59:30 +00:00
Adam Heath
3cb25423a9
More misc. generics/java15 markup.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682054 13f79535-47bb-0310-9956-ffa450edef68
2008-08-02 21:35:29 +00:00
Adam Heath
b6a1ae5e5e
Another minor optimization; no longer need to specify classpathref in
...
all the build.xml files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@681935 13f79535-47bb-0310-9956-ffa450edef68
2008-08-02 03:41:46 +00:00
Adrian Crum
1942cd9de9
ObjectType.java simpleTypeConvert(...) improvement - now converts Long to Date and back, and Long to Timestamp and back.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@681224 13f79535-47bb-0310-9956-ffa450edef68
2008-07-30 22:19:35 +00:00
David E. Jones
2ccff0b5d8
An option I've resisted for a while due to limited flexibility when used, but we have a lot of these common cases so this may be worth it; can now define CrUD services and not have to implement them for common cases; the create, update, and delete ExampleItem services now use this entity-auto implementation instead of explicit simple-methods; those are tested and are working, and other variations on create should too but I haven't tested them yet; this also includes various refactorings to expose nderlying tools in simple method code and make it reusable
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@679058 13f79535-47bb-0310-9956-ffa450edef68
2008-07-23 10:24:58 +00:00
Jacques Le Roux
89cbe8b368
A patch from Markus Studer ""german translations for framework - base, minilang, service, webapp" ( https://issues.apache.org/jira/browse/OFBIZ-1878 ) - OFBIZ-1878
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676947 13f79535-47bb-0310-9956-ffa450edef68
2008-07-15 16:02:31 +00:00
Jacques Le Roux
4f4b4e5e43
Revert previous change done unintentionnaly while testing Subclipse 1.4 new interface (so far I preferred the old one...)
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676279 13f79535-47bb-0310-9956-ffa450edef68
2008-07-13 08:45:11 +00:00
Jacques Le Roux
80c57126a0
New French labels
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676274 13f79535-47bb-0310-9956-ffa450edef68
2008-07-13 08:21:54 +00:00
Jacques Le Roux
0f4984d1d4
Ooops, I just remember that the "list..." functions created in ProductDetail.bsh are always prefixed by "list" so the javascript reserved words check is not needed.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676227 13f79535-47bb-0310-9956-ffa450edef68
2008-07-12 19:52:31 +00:00
Adrian Crum
503c079510
Some minor improvements to the HttpClient class.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676206 13f79535-47bb-0310-9956-ffa450edef68
2008-07-12 17:52:04 +00:00
Jacques Le Roux
643078cc43
Fix "Problems in virtual product's detail page if productFeatureTypeId contain non alfa characters." ( https://issues.apache.org/jira/browse/OFBIZ-230 ) - OFBIZ-230
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@676162 13f79535-47bb-0310-9956-ffa450edef68
2008-07-12 12:19:41 +00:00
Jacopo Cappellato
930970efd3
Upgraded (again) to Tomcat 6.0.16.
...
Upgraded commons-dbcp to the HEAD revision (from snapshot taken in 20071125): the upgrade of the dbcp jar seems to have fixed all the issues we were having with "OutOfMemoryError: Java heap space" exceptions.
Sorry for the noise (two big commits in the base and catalina components in the same day): hopefully this rather critical issue is now resolved (but I will continue my load tests).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674776 13f79535-47bb-0310-9956-ffa450edef68
2008-07-08 11:47:02 +00:00
Jacopo Cappellato
3fd79154a9
As a temp fix for issues with "OutOfMemoryError: Java heap space" errors reported after the upgrade of Tomcat, I'm downgrading from Tomcat 6.0.16 to Tomcat 5.5.23.
...
As soon as the issues is fixed we will commit back the code; this effort is tracked in OFBIZ-1863
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674732 13f79535-47bb-0310-9956-ffa450edef68
2008-07-08 06:44:12 +00:00
Adrian Crum
97ba89b726
Small fixup for last commit - faster, safer code.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674523 13f79535-47bb-0310-9956-ffa450edef68
2008-07-07 15:18:35 +00:00
Adrian Crum
1f39a762bc
Improved screen widget UI label rendering - now expands expressions contained in UI labels (${...}).
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674387 13f79535-47bb-0310-9956-ffa450edef68
2008-07-07 03:21:18 +00:00
Adrian Crum
4bd597df22
FreeMarkerWorker.java improvements:
...
1. Better handling of the FreeMarker Configuration instance. Eliminated the need for synchronizing code.
2. OFBiz transforms are now kept in the Configuration object - no need to load them into the rendering context on every run.
3. Some small code cleanups.
FreeMarkerViewHandler.java improvements:
1. Eliminated redundant Configuration object initialization by cloning the Configuration object kept in FreeMarkerWorker.
2. Now supports the "component://" syntax for page attribute.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674222 13f79535-47bb-0310-9956-ffa450edef68
2008-07-05 18:43:21 +00:00
Jacopo Cappellato
68653b2507
Upgrade to Jetty container version 6.1.11
...
Based on the work and patch by Joe Eckard: OFBIZ-1791
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@673425 13f79535-47bb-0310-9956-ffa450edef68
2008-07-02 15:48:33 +00:00
Adam Heath
9a8f3eb14b
Add checkStack variants.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672903 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 20:41:20 +00:00
David E. Jones
3797437015
Changed to support a default-group-name per delegator, so that they don't have to specified for each entity; also some cleanups of the DelegatorInterface to remove deprecated stuff and add some new things, I still don't think that needs to exist but oh well
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672821 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 17:04:43 +00:00
Adam Heath
f8581e214d
Add another helper method to hide generics warnings.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672804 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 16:05:01 +00:00
Adam Heath
795970df99
Use more Number.valueOf instead of creating new values all the time.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672703 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 04:39:50 +00:00
Adam Heath
2fabc92b17
Generied.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672700 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 04:32:58 +00:00
Adam Heath
9852126ed8
Based on what David discovered, made a correct fix; If srcdir and
...
<src> are both specified for <javac>, then they are added together,
instead of the latter overridding the former. So, to override the
global src attribute in the javac macros, either set it explicitly
when called, or set it to empty, then use the nested <src> elements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672699 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 04:27:54 +00:00
Adam Heath
124f1ed72d
Revert previous change to just this file; some issue with the version
...
of log4j being compiled against.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672686 13f79535-47bb-0310-9956-ffa450edef68
2008-06-30 00:52:30 +00:00
Adam Heath
18391f98a9
The build.xml files are now much smaller and simpler; they reuse a
...
few global definitions. 1585 lines removed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672657 13f79535-47bb-0310-9956-ffa450edef68
2008-06-29 18:39:36 +00:00
Jacopo Cappellato
dbd34520d7
Cleaned up a bunch of warning messages for deprecated methods; in preparation for the framework release.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@671223 13f79535-47bb-0310-9956-ffa450edef68
2008-06-24 15:47:28 +00:00
Jacopo Cappellato
d86e8129de
Applied part of patch created by Joe Eckard in OFBIZ-1791: server info strings returned by the ServletContext are now compared ignoring case.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@671054 13f79535-47bb-0310-9956-ffa450edef68
2008-06-24 08:02:30 +00:00
David E. Jones
91a5ff11ff
Removed old funny hex encode and decode routines from StringUtil, as they produced the same results as the commons library; found and fixed the real problem with the old entity engine encryption so that encrypted fields, including credit card numbers, couldn't be decrypted with the new code and it was the hashed key names no longer matched so the wrong DES key was used, ie a different one from the original key used to encrypt even if the original key was still in there; now it tries both, which is necessary because for systems updated before this went in there will be entries using the old DES key and some using the new DES key, so we can't just try one or the other; this should fix problems with credit cards and other encrypted value decryption after updating to fix the password hashing problem from a few weeks ago
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670731 13f79535-47bb-0310-9956-ffa450edef68
2008-06-23 20:15:27 +00:00
Jacques Le Roux
10676abb06
A patch from Michael Brohl "Configure cookie use for a module through the ofbiz-component.xml" ( https://issues.apache.org/jira/browse/OFBIZ-1831 ) - OFBIZ-1831
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670268 13f79535-47bb-0310-9956-ffa450edef68
2008-06-21 23:02:59 +00:00
Jacopo Cappellato
7939c3c60b
Upgrade to the Geronimo TX Manager 2.1.1; removed old Jencks jar.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670160 13f79535-47bb-0310-9956-ffa450edef68
2008-06-21 07:25:13 +00:00
David E. Jones
8beba39849
Fixed problem with old credit card and other old encrypted fields from before fixing the hex encoding, ie using what the rest of the world uses instead of the buggy old hex encoding that was previously used in OFBiz; now credit card numbers and other entity fields that are encrypted should unencrypt properly, ie it tries the new way and if decryption fails then is tries the old way
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670148 13f79535-47bb-0310-9956-ffa450edef68
2008-06-21 06:07:16 +00:00
Scott Gray
b08bfae6e3
Fix an NPE, some typos and a label
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670108 13f79535-47bb-0310-9956-ffa450edef68
2008-06-21 00:53:09 +00:00
Jacopo Cappellato
b2ac94a266
Added support for the skip-end attribute to form widgets of type "multi": now it is easier to add "global" form parameters to multi forms by concatenating a single form to a multi form with skip-end set to true.
...
Modified the way submitted multi form rows are counted: now the hidden _rowCount field in the form is no more needed because rows are counted in the ServiceMultiEventHandler (using the util methods that I have implemented in the UtilHttp class).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@667930 13f79535-47bb-0310-9956-ffa450edef68
2008-06-15 06:27:15 +00:00
Jacques Le Roux
00c100aa40
A patch from Michael Brohl "FileUtil: write a file from a string with a specified encoding" ( https://issues.apache.org/jira/browse/OFBIZ-1829 ) - OFBIZ-1829
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@664682 13f79535-47bb-0310-9956-ffa450edef68
2008-06-09 11:30:50 +00:00
Adrian Crum
8074d39e80
Fix for NPE reported by Jacopo on the dev mailing list.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@662825 13f79535-47bb-0310-9956-ffa450edef68
2008-06-03 15:20:10 +00:00
Adrian Crum
e6cf1921c2
Small enhancement to the UtilGenerics class. Added two helper methods to make it easier to write type-safe code.
...
Now you can do things like
Map<String, Object> params = UtilGenerics.toMap(context.get("parameters"));
without causing compiler errors or throwing ClassCast exceptions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@662589 13f79535-47bb-0310-9956-ffa450edef68
2008-06-02 22:20:54 +00:00
Adrian Crum
3cb3602fcb
Small improvement to the MapStack class. The create(Map baseMap) method will create a standalone stack if baseMap is a MapStack. This will help reduce the code needed in calling methods.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@662511 13f79535-47bb-0310-9956-ffa450edef68
2008-06-02 18:40:05 +00:00
Jacopo Cappellato
2128610fa6
Based on a recent discussion in the dev list, and especially on the comments from David Jones and the work done by Adrian Crum, I'm committing a patch to refactor all the widget rendering methods and some of the content and Freemarker rendering classes to use Appendable instead of Writer. OFBIZ-1816
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@662328 13f79535-47bb-0310-9956-ffa450edef68
2008-06-02 05:27:12 +00:00