Commit Graph
166 Commits
Author SHA1 Message Date
Adrian Crum e99c4956c1 Fix problem with UI labels in Content Manager - reported on user ml.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@693881 13f79535-47bb-0310-9956-ffa450edef68
2008-09-10 16:18:37 +00:00
Adrian Crum ead3169d5c FlexibleStringExpander refactor.
1. Improved parsing logic - the entire expression is pre-parsed now.
2. Factory method stores parsed expressions in the cache.
3. Single null/empty expression instance - saves on memory.
4. Class names and variable names shortened to reduce object size.
5. Small performance improvements.

The expression cache is set up with no limit. We'll have to see if that needs to be changed. Larger installations might need to limit the expression cache size.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687422 13f79535-47bb-0310-9956-ffa450edef68
2008-08-20 18:50:04 +00:00
Adam Heath 5bc7e67662 Iterate the correct list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@686668 13f79535-47bb-0310-9956-ffa450edef68
2008-08-18 02:37:10 +00:00
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 5930d43294 Another anti-pattern discovery.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685951 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 16:24:56 +00:00
Adam Heath 66d7ec8c94 Use IN instead of looping and creating a bunch of sub-expressions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685945 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 15:37:17 +00:00
Jacopo Cappellato 693ed39c85 Improved some comments; slightly enhanced error handling for the "cms" event; some minor fixes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685587 13f79535-47bb-0310-9956-ffa450edef68
2008-08-13 15:33:15 +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 ad92d19911 Rewrite logList/logMap to use StringBuilder internally.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682260 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 05:32:49 +00:00
Adam Heath f91abc991b s/StringBuffer/StringBuilder/g
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682257 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 04:50:00 +00:00
Adam Heath 763bdfde18 Avoid creating new base object wrappers; instead use valueOf.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682253 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 04:28:23 +00:00
Adam Heath 9ab50c57a4 Make all ServiceEngine method declarations have generics markup.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682252 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 04:18:12 +00:00
Adam Heath 4f5ae70382 Switch to FastList/FastMap/FastSet; they have more stable memory
allocation than java.util variants.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682251 13f79535-47bb-0310-9956-ffa450edef68
2008-08-04 04:02:01 +00:00
David E. Jones 83f56ef712 Deprecating the loopSubContentCache transform because it is a huge mess and the loopSubContent uses the cache anyway; also found that the DemoWebSitePublishPointData.xml file had half of the ContentAssocs going one way, and half another; that is now fixed so they always go from parent to child; this required changes to the loopSubContent transform and various other cleanups along the way and a few fixes; some of these sample uses of the content infrastructure have got to be close to the worst code I've so hopefully someone will have some time to continue cleaning this up and keep their head about them while doing so in order to not make it worse
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@681276 13f79535-47bb-0310-9956-ffa450edef68
2008-07-31 05:03:31 +00:00
Adrian Crum 0c28a5a7e9 Fixed bug in EmailServices.java where it assumed optional parameters existed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@679168 13f79535-47bb-0310-9956-ffa450edef68
2008-07-23 19:41:12 +00:00
Hans Bakker 8096e9634c first version of issue OFBIZ-1886: add statusId field to communicationrole, more testing and additions will follow
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@678605 13f79535-47bb-0310-9956-ffa450edef68
2008-07-22 00:52:16 +00:00
Hans Bakker 1c9e035ee1 add new roles for communicationevents and properly assign them for incoming emails aded mca file
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@678341 13f79535-47bb-0310-9956-ffa450edef68
2008-07-21 04:15:42 +00:00
David E. Jones 63698de234 Fixed bug where links with jsessionid from a cms page had the link built out of order with the jsessionid in the middle
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@677683 13f79535-47bb-0310-9956-ffa450edef68
2008-07-17 18:52:57 +00:00
David E. Jones 7a7762a6bd A few cleanups on this class, done before realizing it wasn't the one I was looking for anywy, and I'm not sure if it's used at all
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@677647 13f79535-47bb-0310-9956-ffa450edef68
2008-07-17 17:38:15 +00:00
Scott Gray 5e54a8a82f Fixed what looks like a potential NPE source
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@677164 13f79535-47bb-0310-9956-ffa450edef68
2008-07-16 06:12:15 +00:00
Bilgin Ismet Ibryam 9dff7c0683 Fixed a bug reported in Jira Issue OFBIZ-1869 "FOPException"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@675872 13f79535-47bb-0310-9956-ffa450edef68
2008-07-11 08:58:29 +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 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
Marco Risaliti 890995e01e Removed some unused bsh scripts (Part of issue OFBIZ-1801)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@667658 13f79535-47bb-0310-9956-ffa450edef68
2008-06-13 21:20:21 +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
Adrian Crum a6c9ae6425 Oops, missed some files in last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@662127 13f79535-47bb-0310-9956-ffa450edef68
2008-06-01 02:34:49 +00:00
Scott Gray 8830da20fb Fix for OFBIZ-1813 reported by Jacapo Cappellato, NPE when rendering PDF attached to the order confirmation email
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@661931 13f79535-47bb-0310-9956-ffa450edef68
2008-05-31 02:18:06 +00:00
David E. Jones 0d6a10e5b8 More cleanups of now deprecated constructors and what what
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@660843 13f79535-47bb-0310-9956-ffa450edef68
2008-05-28 07:22:59 +00:00
Scott Gray 153653615b Removed the rest of the calls to deprecated GenericDelegator methods, except for the findListIteratorByCondition which takes a DynamicViewEntity as a parameter not sure what to do about that one.
There's still all the bsh files to check though.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@655235 13f79535-47bb-0310-9956-ffa450edef68
2008-05-11 03:29:04 +00:00
Bilgin Ismet Ibryam e58584c84a Fix an error.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@655029 13f79535-47bb-0310-9956-ffa450edef68
2008-05-10 08:44:04 +00:00
Scott Gray 0792342f2a Removed more calls to deprecated GenericDelegator methods
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@655016 13f79535-47bb-0310-9956-ffa450edef68
2008-05-10 06:24:19 +00:00
David E. Jones 329631a4b5 A whole bunch of cleanups to use newer and more consolidated delegator find methods; still lots of deprecation warnings, bots of deprecation warnings but this is a first pass, and things still run as before
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@653029 13f79535-47bb-0310-9956-ffa450edef68
2008-05-03 09:40:51 +00:00
Andrew Zeneski ae651c8ff0 changed method getDataResourceContentUploadPath() to also accept the parameters to override the values found in the properties file. This will allow better re-use of this method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@635321 13f79535-47bb-0310-9956-ffa450edef68
2008-03-09 18:31:16 +00:00
Andrew Zeneski a85226d9d1 updated streaming event to allow passing parameters in as path info (using UtilHttp.getParameterMap())
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@634802 13f79535-47bb-0310-9956-ffa450edef68
2008-03-07 20:21:09 +00:00
Si Chen c935e8a208 allow retrieving survey response if there were an errorf
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@629279 13f79535-47bb-0310-9956-ffa450edef68
2008-02-19 23:50:35 +00:00
Hans Bakker c955ca6700 correction to avoid null pointer exception when data is missing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@618903 13f79535-47bb-0310-9956-ffa450edef68
2008-02-06 05:30:57 +00:00
Adrian Crum 078fc06cc0 Oops, I forgot to uncomment a line before my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@614735 13f79535-47bb-0310-9956-ffa450edef68
2008-01-23 23:40:58 +00:00
Adrian Crum b6977272aa Fixed bug in Party Manager Edit Comm Content screen - https://issues.apache.org/jira/browse/OFBIZ-1575.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@614733 13f79535-47bb-0310-9956-ffa450edef68
2008-01-23 23:37:19 +00:00
Bilgin Ismet Ibryam 75db3ce00a Disabled 'Tell-A-Friend' and 'Customer Reviews' links from Order manager.
Small cleanups.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@611802 13f79535-47bb-0310-9956-ffa450edef68
2008-01-14 14:12:01 +00:00
Si Chen 8cf5749982 Fix overflow bug when email system attempts to create a CommunicationEvent.note that's larger than the field size.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@610639 13f79535-47bb-0310-9956-ffa450edef68
2008-01-10 01:48:08 +00:00
Bilgin Ismet Ibryam b4a9b7f296 Added the missing import for r606789.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@606794 13f79535-47bb-0310-9956-ffa450edef68
2007-12-25 15:30:14 +00:00
Jacques Le Roux bce4f0cb55 Refactored from a Fabien Carrion's patch "Send mail through gmail with the javamail api in ofbiz" (https://issues.apache.org/jira/browse/OFBIZ-1256) - OFBIZ-1256
With the help of Chris Howe

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@606789 13f79535-47bb-0310-9956-ffa450edef68
2007-12-25 13:19:29 +00:00
Jacques Le Roux 21fc2f91ba A patch from Fabien Carrion "To permit to have a view with jasperreports to export to excel using the poi api, or the jxls api." (https://issues.apache.org/jira/browse/OFBIZ-1250) - OFBIZ-1250
JasperReports is any longer used in OFBIz but this might be helpful in some occasions. As it changes anything (I reviewed but no tested) I prefer to commit than ignore.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@604728 13f79535-47bb-0310-9956-ffa450edef68
2007-12-16 22:38:02 +00:00
Adrian Crum b584b3549b FOP code improvements, based on https://issues.apache.org/jira/browse/OFBIZ-1414.
The Jira issue mentions rendering to temp files, but I kept that out of the commit. If we get out of memory errors in the future, it will be easy to add it back in.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@603483 13f79535-47bb-0310-9956-ffa450edef68
2007-12-12 06:38:23 +00:00
Andrew Zeneski baaa3a828f added code to allow adding objects to the FTL for survey rendering
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@596003 13f79535-47bb-0310-9956-ffa450edef68
2007-11-17 20:57:23 +00:00
David E. Jones 75c26763e5 Fairly significant update to correct a long-standing problem; reverted ByteWrapper back for backward compatibility, and then replaced all use of ByteWrapper with java.nio.ByteBuffer; the main point is to both store only the byte[] data in the database and not a serialized object containing the byte[], and at the same time be able to read the old ByteWrapper objects, and there is a service to read and update all old data to be plan bytes instead of wrapped in a serialized object; this includes changing the java-type for blob fields to be java.sql.Blob to greater compatibility and flexibility, ie you can either set a plain byte[] or you can pass in a Blob object to be persisted, you can also get both as get returns java.sql.Blob, but getBytes always returns the byte[], converting as needed; this is tested a fair amount, but obviously needs to be watched as it is new code
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@587433 13f79535-47bb-0310-9956-ffa450edef68
2007-10-23 09:52:49 +00:00
Adam Heath c77ec31ac6 Fix stupid problems with javac and type inference.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@586925 13f79535-47bb-0310-9956-ffa450edef68
2007-10-21 18:19:34 +00:00
Adam Heath 2ff7a8a575 Make use of the single-arg variants of makePK/makeValue, removeAll,
and clearCacheLine


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585803 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:46:57 +00:00
Adam Heath 56ae98f437 Make use of UtilCache.findCache.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585801 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 02:41:30 +00:00
Adam Heath abd5c3b0d6 Used LinkedHashMap/LinkedHashSet, from collections 1.2, instead of
using local variants.  Deprecated OrderedMap/OrderedSet.  The filed
patch removed them, but that might break downstream code, so I'll
leave them in for now.  Closes
https://issues.apache.org/jira/browse/OFBIZ-1324


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585679 13f79535-47bb-0310-9956-ffa450edef68
2007-10-17 20:37:37 +00:00