Commit Graph
260 Commits
Author SHA1 Message Date
Jacopo Cappellato 2bff493b7a Removed a few useless/incorrect references to the ServiceDispatcher class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1364615 13f79535-47bb-0310-9956-ffa450edef68
2012-07-23 12:51:12 +00:00
Adrian Crum 2a0058a04b New feature - performance metrics. Basic code and services.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361722 13f79535-47bb-0310-9956-ffa450edef68
2012-07-15 16:07:59 +00:00
Adrian Crum a17298a06e Removed unused "authz" security code - https://issues.apache.org/jira/browse/OFBIZ-4839.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1360283 13f79535-47bb-0310-9956-ffa450edef68
2012-07-11 16:34:26 +00:00
Jacopo Cappellato 1555db10e1 Set cache flag for findByAnd method calls in PreferenceServices; improved logic to avoid to run the same query twice when user is not passed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1347442 13f79535-47bb-0310-9956-ffa450edef68
2012-06-07 07:36:47 +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
Jacques Le Roux 0157ddcbda 2 missing ASL2 headers, while at it...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1341399 13f79535-47bb-0310-9956-ffa450edef68
2012-05-22 10:57:13 +00:00
Jacopo Cappellato 4b1ed290e1 Completed refactoring/cleanup of captcha implementation that now supports screens with more than one captcha in them.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338700 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 13:31:15 +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
Scott Gray 7f0893f8cd Deprecated org.ofbiz.common.Captcha
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337058 13f79535-47bb-0310-9956-ffa450edef68
2012-05-11 08:23:10 +00:00
Scott Gray 20047d5fe3 Copied the captcha image generator into a single event that streams the image to the response for a direct request rather than trying to store it during screen rendering to be served up later.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337057 13f79535-47bb-0310-9956-ffa450edef68
2012-05-11 08:23:02 +00:00
Ashish Vijaywargiya e0971b304c Applied similar fix as we did on trunk r1300463.
On production systems you can't suppress Debug.log( message by the use of debug.properties file. It is always good to use Debug.* statements that are having log level setup in debug.properties file. The real problem comes with Debug.log( statement when you are printing any list or map object that contains so many records(or data) in it. Here I am changing all the occurrence of Debug.log( with Debug.logInfo(, Debug.logError( or Debug.logWarning( so that we can have better control of Debug.* statements on production system. :-)

Bad use of Debug statement. On production system you will get false alarm that you are having error in code base although the resultant statement is only giving additional information instead of error message.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335927 13f79535-47bb-0310-9956-ffa450edef68
2012-05-09 05:28:17 +00:00
Jacopo Cappellato 5b528efa2d First pass in fixing the buggy code for captcha support; this is a first pass (the next one will probably be to save the image in the session rather than in the file system); the main problems fixed are related to concurrent access: the class was not thread safe and this, especially in servers with high traffic, could cause a series of issues like:
* captcha images created and then lost
* captcha images created in the wrong location (for example out of the OFBiz folder)
* the folder runtime/tempfiles/captcha could be locked



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335047 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 14:46:07 +00:00
Jacques Le Roux 80af13f2c1 Non functional changes. Removes useless exceptions catches.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334576 13f79535-47bb-0310-9956-ffa450edef68
2012-05-06 09:06:39 +00:00
Adam Heath 33101dbaa2 FEATURE/DEPRECATION: Deprecate HashCrypt.cryptPassword; previously,
it would call String.getBytes(), without specifying an encoding.  That
meant that the platform default encoding would be used, which might
change between different installs(if someone changed an environment
variable, for instance).  Now, there are explicit variants to be called.

When creating a new value, use cryptValueUTF8.  If, for some reason,
calling code is doing it's own comparison, it must continue to use
cryptValueBytes(password.getBytes()).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334170 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 20:42:26 +00:00
Adam Heath b767ef1868 OPTIMIZE: Remove cryptPassword(String, String); it is not nescessary to
go thru a deprecation cycle for this, as this method was only recently
added, and has never been officially released.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1333664 13f79535-47bb-0310-9956-ffa450edef68
2012-05-03 22:20:24 +00:00
Jacques Le Roux 986c1ae6ac A patch from Daniel Riquelme "Enable NOT-IN operator to performFind" https://issues.apache.org/jira/browse/OFBIZ-4815
This patch will enable NOT-IN operator to the performFind service.
Only two lines of the file framework/common/src/org/ofbiz/common/FindServices.java were modified to enable de NOT-IN operator.
An use case is provided to test

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328637 13f79535-47bb-0310-9956-ffa450edef68
2012-04-21 11:38:14 +00:00
Jacques Le Roux 567080a8e3 Fixes a NPE introduced at r1328122
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328226 13f79535-47bb-0310-9956-ffa450edef68
2012-04-20 06:59:06 +00:00
Jacques Le Roux 5e5f0e27a5 This introduces a mean to hide a service result in log (when the service is longer than 50 ms and Debug.timingOn() or > 200 ms and Debug.infoOn(), see ServiceDispatcher.java, just above line 600)
A hideResultInLog service attribute is added. If set to true the service result will be hidden from possible exposition in ServiceDispatcher.runSync() 
This is convenient when used for sending a password to an user (the password must be legible in the sent mail). 
I'm sure a lot of you would want to have no logs at all in production. But by experience I know that we need to log info in logs even in production. Especially when the system is quickly moving ahead...
So this is a sure mean to hide any password in logs, being current or backuped somewhere on the servers disks...


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328122 13f79535-47bb-0310-9956-ffa450edef68
2012-04-19 21:41:39 +00:00
Adam Heath f092508550 FEATURE: Make use of new HashCrypt cryptPassword functionality.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327741 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 23:49:22 +00:00
Adam Heath 3cea0258d0 OPTIMIZE: Refactored LoginServices.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1327737 13f79535-47bb-0310-9956-ffa450edef68
2012-04-18 23:48:58 +00:00
Adrian Crum 48ac918030 Made the ScriptHelperImpl createServiceMap method behave more like mini-language. Error messages are saved in the result Map.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300965 13f79535-47bb-0310-9956-ffa450edef68
2012-03-15 12:58:46 +00:00
Adrian Crum ded0847a65 Simplified ContextHelper.java code by adding auto-creation of some commonly-used bindings.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300954 13f79535-47bb-0310-9956-ffa450edef68
2012-03-15 12:26:50 +00:00
Adrian Crum 762466f309 Fix type-unsafe casts in ContextHelper.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300889 13f79535-47bb-0310-9956-ffa450edef68
2012-03-15 10:37:38 +00:00
Hans Bakker 0372daa663 OFBIZ-4638: make ofbiz run with openjdk7,6. Contribution of Chattree
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299985 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 06:50:41 +00:00
Adrian Crum fda9bad4cf More JSR-223 work - added a ScriptHelper object to the bindings. Also added a demonstration to the JavaScript test service.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299924 13f79535-47bb-0310-9956-ffa450edef68
2012-03-12 23:20:55 +00:00
Adrian Crum 4a48104212 Add private constructors to static utility classes. Patch provided by Rishi Solanki - https://issues.apache.org/jira/browse/OFBIZ-4656.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1243364 13f79535-47bb-0310-9956-ffa450edef68
2012-02-12 23:19:33 +00:00
Hans Bakker 9de0762a42 make it possible that the applicable system settings in general properties can be overridded by settings in the database.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1240016 13f79535-47bb-0310-9956-ffa450edef68
2012-02-03 07:17:00 +00:00
Erwan de Ferrieres 05c9bae6e5 tabs to spaces, no functional changes - java files
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1230478 13f79535-47bb-0310-9956-ffa450edef68
2012-01-12 10:37:35 +00:00
Andrew Zeneski 11bcb7d52e reverted previous commit since it breaks SUN (oracle) JDK, ick.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1211088 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 20:25:52 +00:00
Andrew Zeneski 15228ae88b few minor changes to fix compiling with openjdk icetea6 1.7.9
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1211073 13f79535-47bb-0310-9956-ffa450edef68
2011-12-06 19:51:28 +00:00
Jacques Le Roux 6d839bb4a5 A patch from Leon "add datetimepicker language file for zh-CN, zh-HK, zh-TW, and an en one in order to avoid "jquery-ui-timepicker-en.js" not found error" https://issues.apache.org/jira/browse/OFBIZ-4555
1. add datetimepicker language file to system: jquery-ui-timepicker-zh-CN.js, jquery-ui-timepicker-zh-HK.js and jquery-ui-timepicker-zh-TW.js.
2. also add a "jquery-ui-timepicker-en.js" file, it's the default datetimepicker language file but not exist now.
3. run service "createJsLanguageFileMapping" to update sLanguageFileMapping.java accordingly.

jleroux: not sure "jquery-ui-timepicker-en.js" is really needed, but cleaner for sure

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1201229 13f79535-47bb-0310-9956-ffa450edef68
2011-11-12 09:31:49 +00:00
Hans Bakker 1fc8c427f5 find service did not work properly on the selection end date
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1195354 13f79535-47bb-0310-9956-ffa450edef68
2011-10-31 06:48:10 +00:00
Jacques Le Roux d10ff1719f JQuery team does not care about plugins consistency, so we have to be careful. For instance, for more fun: in validate plugin we have also ptpt and ptbr...
Just found by chance while looking for consistency in JsLanguageFileMappingCreator class after refactoring

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1182858 13f79535-47bb-0310-9956-ffa450edef68
2011-10-13 13:51:37 +00:00
Jacques Le Roux 690a5dd02e Fix a bug reported by Chatree "JavaScript location is empty causes a double requests problem" https://issues.apache.org/jira/browse/OFBIZ-4477
In r1178199, I missed to use the default DateTime file (jquery.ui.datepicker-en.js) being still with the idea that it was handled internally.

I have also refactored/simplified JsLanguageFileMappingCreator class and put comments to better explain how all that works






git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1182731 13f79535-47bb-0310-9956-ffa450edef68
2011-10-13 09:07:12 +00:00
Jacques Le Roux 399b52a033 Closes "The time part (cursors) of the Date Time picker is not internationalized" https://issues.apache.org/jira/browse/OFBIZ-4015
Fixes the problem by:
* Updating datetimepicker from 0.9.3 to 0.9.6 (where a localization folder exists)
* Use the fantastic createJsLanguageFileMapping service Sascha introduced (I just removed the confusing wrong comment about JsLanguageFilesMapping.ftl being generated and added a block for datetimepicker, also in JsLanguageFileMappingCreator.java). A very good dynamic+static tool, kudos Sascha!

Should work also in eCommerce though I did not found any uses

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1178199 13f79535-47bb-0310-9956-ffa450edef68
2011-10-02 15:59:12 +00:00
Jacques Le Roux 480435601f A slightly modified patch from Dimitri Unruh "Minor code style improvement" https://issues.apache.org/jira/browse/OFBIZ-4400
In the createJsLanguageFileMapping service, the catch blocks have assigns to a local variable in a return statement.

Simplified further on Adrian's advice.

jleroux: I have also organized imports

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1172342 13f79535-47bb-0310-9956-ffa450edef68
2011-09-18 20:48:27 +00:00
Jacques Le Roux 00afa0c283 A patch from Dimitri Unruh "Some dead variable assignments " https://issues.apache.org/jira/browse/OFBIZ-4426
Some value assignments to local variables without reading or using it.

jleroux: indeed I don't see any reasons to set the size of a byte array before feeding it with String.getBytes(), since NPE is handled above. I have even simplified it more using function composition style.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1172015 13f79535-47bb-0310-9956-ffa450edef68
2011-09-17 16:51:38 +00:00
Sascha Rodekamp d6c19a4ac8 A patch from Leon to get the correct "jquery.ui.datepicker-xx-XX.js" (https://issues.apache.org/jira/browse/OFBIZ-4377)
It uses "locale" (e.g. zh_TW) to form the jquery.ui.datepicker file name in method JsLanguageFileMappingCreator.createJsLanguageFileMapping, but jquery uses dash ("-") instead of underscore ("_") to concat the language code and country code, such as zh-TW vs. zh_TW.

A very trivial update to JsLanguageFileMappingCreator.java, and after that, update the JsLanguageFileMapping.java file by running service "createJsLanguageFileMapping". In attached, contains both of patches to these two files.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1163533 13f79535-47bb-0310-9956-ffa450edef68
2011-08-31 08:57:29 +00:00
Sascha Rodekamp 8ea4b86713 Improvement: OFBIZ-4270 - State dropdown only finds states and does not include county information
Reorganized and extend the Data structure, now it is possible to store additional country postal code regex data 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1153402 13f79535-47bb-0310-9956-ffa450edef68
2011-08-03 09:12:31 +00:00
Hans Bakker 53de1508c4 improve the alternative seo friendly content url: some url's where not recognized
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1153366 13f79535-47bb-0310-9956-ffa450edef68
2011-08-03 07:12:29 +00:00
Hans Bakker cb7b9a6471 currently it is pretty difficult to disable a userlogin by setting the deleted date to a date in the future and enable=N, further when disable a party tries to disable related userlogins but does not set that future date. This change will allow to nullify the deleted date so it is now clear the userlogin will never be enabled. The deleted date is still available in the last modified date.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1142908 13f79535-47bb-0310-9956-ffa450edef68
2011-07-05 07:18:54 +00:00
Hans Bakker 1749a6989f Add seo friendly url's for showing content. reorganize the same program snippets with seo friendly url for products. These content url's are demonstrated at the ecommerce frontend in the left bottom corner: Content Information
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1141878 13f79535-47bb-0310-9956-ffa450edef68
2011-07-01 09:03:32 +00:00
Sascha Rodekamp bb87a9eb87 State dropdown only finds states and does not include county information (https://issues.apache.org/jira/browse/OFBIZ-4270) - I added a separte Entity which defines all countries which should show their states in the drop down list. It also checks states recursivly, to list all states (i.e.) for GB.
Orig Msg: If you are on this page https://demo-trunk.ofbiz.apache.org:8443/ecommerce/control/newcustomer select USA from the country drop down and it will display all the USA states, similarly it works just fine for Spain but if you try once again with either United Kingdom or France it will show "No States/Provinces exist".

Both UK and France have Counties saved in the datamodel but the form does not lookup in the correct location as they are not defined as State.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1140103 13f79535-47bb-0310-9956-ffa450edef68
2011-06-27 11:01:06 +00:00
Marco Risaliti a153d0a34f Removed some javadoc warning (wrong param/return) into framework components no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1126708 13f79535-47bb-0310-9956-ffa450edef68
2011-05-23 20:11:12 +00:00
Marco Risaliti 77cc4d7ac7 Remove some unused variable into JsLanguageFileMappingCreator
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1125961 13f79535-47bb-0310-9956-ffa450edef68
2011-05-22 13:29:48 +00:00
Sascha Rodekamp 797e4caad6 localization for jQuery validate plugin is not working (https://issues.apache.org/jira/browse/OFBIZ-4275). This patch enabels the i18n file loading for the validation plugin.
Orig Msg.
the validate plugin is not using the localized files.
Everything needed seems to be there.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1102597 13f79535-47bb-0310-9956-ffa450edef68
2011-05-13 08:06:05 +00:00
Sascha Rodekamp 5081061679 Update - Added a new datejs language i18n file for danish date/time conversion.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1098578 13f79535-47bb-0310-9956-ffa450edef68
2011-05-02 14:03:56 +00:00