Commit Graph
2421 Commits
Author SHA1 Message Date
Adrian Crum f5a0e74f27 Added comments for cache settings. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1668351 13f79535-47bb-0310-9956-ffa450edef68
2015-03-22 10:27:58 +00:00
Deepak Dixit bdba71d230 OFBIZ-6183: Update ComponentConfig code to allow empty mount point, as if need to mount website on root then mount-point should be "" instead of "/".
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1668236 13f79535-47bb-0310-9956-ffa450edef68
2015-03-21 11:14:55 +00:00
Jacopo Cappellato 38017100b3 Upgraded the following commons jars:
- codec from 1.6 to 1.10
- validator from 1.4.0 to 1.4.1
- logging from 1.1.2 to 1.2
- net from 3.1 to 3.3
- csv from 1.0 to 1.1
Resolves OFBIZ-6157, OFBIZ-6158, OFBIZ-6159, OFBIZ-6160, OFBIZ-6161



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1667055 13f79535-47bb-0310-9956-ffa450edef68
2015-03-16 16:17:49 +00:00
Jacopo Cappellato 0db5888047 OFBIZ-6156: Upgraded commons-pool2 from 2.2 to.2.3 and commons-dbcp2 from 2.0.1 to 2.1
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1666958 13f79535-47bb-0310-9956-ffa450edef68
2015-03-16 10:58:26 +00:00
Jacopo Cappellato f69e599355 Upgrade to latest bug fix release of Freemarker: 2.3.22
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1666949 13f79535-47bb-0310-9956-ffa450edef68
2015-03-16 10:31:13 +00:00
Jacopo Cappellato 68723a2130 Upgrade to latest release of Log4j
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1666939 13f79535-47bb-0310-9956-ffa450edef68
2015-03-16 09:20:14 +00:00
Jacopo Cappellato 34beacd425 Relaxing default behavior of canonicalization in order to allow mixed and multiple encodings: with this change, in these cases, instead of throwing an error it will simply log a worning message.
This should fix, at least as a temporary solution, the recent issues happening after the upgrade to the new ESAPI.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1659224 13f79535-47bb-0310-9956-ffa450edef68
2015-02-12 11:17:46 +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 14e3b15252 Some small fixups for some of my previous commits.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1650347 13f79535-47bb-0310-9956-ffa450edef68
2015-01-08 17:53:59 +00:00
Adrian Crum 7c9aa8e489 Some optimizations for URL lookups.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649979 13f79535-47bb-0310-9956-ffa450edef68
2015-01-07 00:24:28 +00:00
Adrian Crum b85eb53598 Removed an unused method from UtilURL.java, added some JavaDocs.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649971 13f79535-47bb-0310-9956-ffa450edef68
2015-01-06 23:22:56 +00:00
Adrian Crum 1df97ce20c Fixed a bug in FlexibleLocation.java where the optional locationresolvers.properties file was not being loaded due to static initializer recursion.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649934 13f79535-47bb-0310-9956-ffa450edef68
2015-01-06 20:21:28 +00:00
Adrian Crum c201d5f6f3 Small change to Debug.java - to avoid static initializer recursion.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649933 13f79535-47bb-0310-9956-ffa450edef68
2015-01-06 20:19:56 +00:00
Adrian Crum 38c358671f A new method for UtilProperties.java - to be used in upcoming changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649931 13f79535-47bb-0310-9956-ffa450edef68
2015-01-06 20:18:43 +00:00
Adrian Crum b20c4adfbc Make sure InputStream is closed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649701 13f79535-47bb-0310-9956-ffa450edef68
2015-01-06 01:05:29 +00:00
Adrian Crum a02828a34e Improvement: Remove unnecessary resource check from UtilURL.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649696 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 23:58:06 +00:00
Adrian Crum ffc11dc5a3 Some code cleanup in UtilProperties.java:
1. Removed redundant cache.
2. Removed unnecessary synchronized block.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649686 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 22:54:42 +00:00
Adrian Crum 184fe56ac1 Improvement: Enable XML validation for properties files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649675 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 21:46:54 +00:00
Adrian Crum e64fbd6c9f Improvement: Replace library-specific concrete class with library-agnostic factory method call in UtilXml.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649674 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 21:43:46 +00:00
Adrian Crum 79ecbea037 Bug fix: add missing attribute to ofbiz-properties.xsd.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649668 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 21:39:46 +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
Adrian Crum 66adcd9de2 Fix Web Tools FindGeneric screen so it can display byte-array field types.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649615 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 19:15:24 +00:00
Ashish Vijaywargiya cbbdc011d3 Applied patch from jira issue - OFBIZ-3464 - Added check if the creditcard number string is numeric in validation method isCreditcard in UtilValidate.
Thanks Nils for creating the issue and providing the patch for the same. Thanks Divesh for your help in verification. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649393 13f79535-47bb-0310-9956-ffa450edef68
2015-01-04 19:53:29 +00:00
Jacopo Cappellato 9ce782f90b Removed a bunch of dependencies of Owasp Esapi classes after I realized (by studying the Esapi source files and the integration in OFBiz) that we were using a small part of that product; this made it possible to upgrade to the latest release of Owasp Esapi (2.1.0) without having to include a bunch of jars.
I had to comment out two lines in the unit tests because they were failing after the upgrade; still investigating on this.
This commit resolves OFBIZ-5343.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648747 13f79535-47bb-0310-9956-ffa450edef68
2014-12-31 17:31:16 +00:00
Jacopo Cappellato a5879b6f8f Moved code dependent on OWASP ESAPI and utilities for codec tasks from StringUtil to a new UtilCodec class: now the UtilCodec class is the only class dependent on OWASP ESAPI.
The DefaultEncoder from OWASP ESAPI, used internally by UtilCodec is now built with the default constructor that also adds the JavascriptCodec to the list of codecs used to canonicalize and validate the input.
Renamed the UrlEncoder class to UrlCodec in order to better describe its behavior.
Misc minor cleanups.
Added to the list of tests of the base component a series of Junit test classes that were missing.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648403 13f79535-47bb-0310-9956-ffa450edef68
2014-12-29 18:24:57 +00:00
Jacopo Cappellato b969e376ed A series of cleanup to the integration with OWASP ESAPI. Isolated dependencies on the external OWASP ESAPI jar into the StringUtil class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648298 13f79535-47bb-0310-9956-ffa450edef68
2014-12-29 09:24:46 +00:00
Adrian Crum 5f231ec005 Fixed a NPE I introduced in rev 1647606. Reported by Pierre Smits on dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1648139 13f79535-47bb-0310-9956-ffa450edef68
2014-12-28 00:58:44 +00:00
Adrian Crum 9be5ed5e06 UtilMisc.java improvements:
1. Replace DCL code with lazy-initializer class.
2. Small code cleanup.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647873 13f79535-47bb-0310-9956-ffa450edef68
2014-12-25 05:41:13 +00:00
Adrian Crum fc86aee024 UtilProperties.java improvements:
1. Replace DCL code with lazy-initializer class.
2. Remove class name from static method calls.
3. Remove some @Deprecated annotations.

When they were written, the deprecated methods simulated forthcoming Java 6 functionality - with the intent that they would be replaced with Java 6 equivalents, but the Java 6 functionality behaves differently than the deprecated methods. So, replacing the deprecated methods with Java 6 equivalents would cause undesired behavior.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647866 13f79535-47bb-0310-9956-ffa450edef68
2014-12-25 00:45:18 +00:00
Adrian Crum 06b7bcbb8b UtilDateTime.java improvements:
1. Replace DCL code with lazy-initializer class.
2. Remove class name from static method calls.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647861 13f79535-47bb-0310-9956-ffa450edef68
2014-12-24 23:37:06 +00:00
Adrian Crum 6731e764ef Bug fix: Make DateRange.java truly immutable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647839 13f79535-47bb-0310-9956-ffa450edef68
2014-12-24 20:21:46 +00:00
Adrian Crum 209a0261fb Remove references to immutability from ComparableRange.java - because its contained objects might be mutable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647838 13f79535-47bb-0310-9956-ffa450edef68
2014-12-24 20:19:42 +00:00
Jacques Le Roux 464fd93aec Implements "Improve the way FOP handles fonts notably for currency symbols" https://issues.apache.org/jira/browse/OFBIZ-5917
Adds
<auto-detect/>
in the fonts section of our fop.xconf

Adds the Google NotoSans font which is Apache licensed
* http://www.google.com/fonts/specimen/Noto+Sans
* https://www.google.com/get/noto/#/

Uses NotoSans as the default FOP font. For that puts the NotoSans font 4 files in framework/resources/fonts and add <directory>framework/resources/fonts/NotoSansFonts</directory> in fop.xconf
Renders ₹ in content/control/fonts.pdf as we do for €. Other symbols could be added later when needed, backed by Google NotoSans font...
Renders the NotoSans content/control/fonts.pdf  as we do for other main fonts

Adds the rupee symbol (₹) to antisamy-esapi.xml file like we have the euro symbol (€)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647782 13f79535-47bb-0310-9956-ffa450edef68
2014-12-24 13:45:03 +00:00
Adrian Crum 7aa7ea5769 Fixed a bug in UtilDateTime.java where SimpleDateFormat instances were not initialized with the locale.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647606 13f79535-47bb-0310-9956-ffa450edef68
2014-12-23 16:21:14 +00:00
Jacopo Cappellato 4384b31ed9 Removed two unnecessary overloaded methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1647289 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 11:08:07 +00:00
Jacques Le Roux 5e6077d737 Adds the rupee symbol (₹) to antisamy-esapi.xml like we have the euro symbol(€)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1646781 13f79535-47bb-0310-9956-ffa450edef68
2014-12-19 15:56:21 +00:00
Jacopo Cappellato 652ff50044 Two Groovy DSL descriptors for Eclipse and IntelliJ in order to get the autocompletion and similar features while editing Groovy files in OFBiz.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643183 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 08:16:22 +00:00
Jacopo Cappellato 0e421f293e OFBIZ-5894 When ContentWorker.renderContentAsText is used to render content that have electronicText with empty textData then it renders a string with the "null" value: this commit fix the issue. Thanks to Deepak Dixit for the bug report and fix.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1643088 13f79535-47bb-0310-9956-ffa450edef68
2014-12-03 10:51:52 +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 5510c3ea5b Upgraded httpclient libraries. HttpClient defaults to TLS instead of SSLv3.
http://www.apache.org/dist/httpcomponents/httpclient/RELEASE_NOTES-4.3.x.txt

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1637883 13f79535-47bb-0310-9956-ffa450edef68
2014-11-10 15:15:59 +00:00
Adrian Crum 871ec276fb Fixed UtilProperties.java bug caused by removal of Javolution - https://issues.apache.org/jira/browse/OFBIZ-5857.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1637064 13f79535-47bb-0310-9956-ffa450edef68
2014-11-06 10:08:40 +00:00
Jacopo Cappellato 66daa32f1a Cleaned up and inproved the code that integrates Groovy in the OFBiz framework:
* Groovy services and Groovy events now use the same util methods from GroovyUtil to parse/execute the scripts
* the script base class is now specified in the base/config/groovy.parameter file rather than in the serviceengine.xml
* the same util methods (DSL) are now available to all Groovy scripts (executed as services, events or widget actions)
* removed a series of unused methods in the GroovyUtil class



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1636346 13f79535-47bb-0310-9956-ffa450edef68
2014-11-03 13:15:29 +00:00
Adrian Crum e7794e5824 Finish removing Javolution from the base component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635910 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 09:55:57 +00:00
Jacopo Cappellato 3552f65800 Merged json-integration-refactoring into trunk:
* moved the json-lib jar (json-lib-2.2.3-jdk15.jar) from the framework/webapp to the framework/base component
* removed the SQL select Parser.jj (parser definition) and its unit tests: it was not used (and never used) by any OFBiz code
* removed the JSON.jj (parser definition) and its unit tests: it was not used (and never used) by any OFBiz code apart from the JSON Converters (now migrated to json-lib, see next items in this list) some utility methods in UtilIO.java (that have been removed too because they have never been used in OFBiz) 
* removed the JavaCC jar and related ant scripts because no more needed after the removal of Parser.jj and JSON.jj
* converted the JSONConverter code that was based on JSON.jj to Jackson
* added a new class org.ofbiz.base.lang.JSON that have been contributed by Adrian Crum that is a facade for simplifying the client code and for hiding the specific JSON library being used
* removed an unused method: ImageManagementServices.toJsonObject(...)
* added TestBooleanConverters to the list of tests
* new unit tests for the new JSON converters
* refactored Ajax code in applications to use the common request json response rather than a custom method
* OFBIZ-5790 Implemented ability to call a service event by passing its input parameters in the request body as JSON data. These classes provide a simple mechanism, based on the request's content type, that can be extended to support other formats (e.g. XML).

This commit resolves OFBIZ-4572, OFBIZ-3365, OFBIZ-5751, OFBIZ-5790



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635901 13f79535-47bb-0310-9956-ffa450edef68
2014-11-01 09:06:42 +00:00
Adrian Crum d6f7e2aa5a Fixup for my previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635877 13f79535-47bb-0310-9956-ffa450edef68
2014-10-31 23:08:29 +00:00
Adrian Crum 79dc510f05 Remove Javolution from most of the base component. I didn't do the converters to avoid merge conflicts with the JSON branch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1635846 13f79535-47bb-0310-9956-ffa450edef68
2014-10-31 19:29:46 +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 96cd99914e Remove unnecessary imports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1634027 13f79535-47bb-0310-9956-ffa450edef68
2014-10-24 08:28:47 +00:00
Jacopo Cappellato 99a72aff4a Some modifications to the default configuration of log4j2:
1) added a comment to summarize the default configuration, with a reference to the online log4j2 documentation for further customizations
2) added a new appender for errors (or greater); implemented using a filter to keep the logger definition as clean as possible
3) removed the external appender because the amount of log statements (warnings or greater) from external jars is not large and should not cause much confusion if we keep them with OFBiz log statements
4) increased the number of rolling files for ofbiz.log to 10
5) changed date format to "yyyy-mm-dd hh:mm:ss.sss"


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1633550 13f79535-47bb-0310-9956-ffa450edef68
2014-10-22 07:50:08 +00:00
Jacopo Cappellato ac7bfdfbed Cleaned up the way the classloaders are setup at startup by removing duplicate logic and responsibilities between the start and base components.
Before this change the following classloader hierarchy was setup:
1) the "application" classloader for the "start" component
2) one "native lib" classloader for the "base" component
3) one "native lib" classloader for the all the other (non "base") framework/application/specialpurpose/hot-deploy components
4) one "web app" classloader for each of the webapplications

After this commit the hierarchy is simplified by merging #2 and #3:
a) the "application" classloader for the "start" component
b) one "native lib" classloader for the all the framework/application/specialpurpose/hot-deploy components (including the "base" component)
c) one "web app" classloader for each of the webapplications

This has been achieved by merging the code that was setting up classloader #2 in the start component (for the "base" component) with the code that was setting up the classloader #3 in the base component: now all the code is in the start component.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1633182 13f79535-47bb-0310-9956-ffa450edef68
2014-10-20 16:13:33 +00:00