Commit Graph
8242 Commits
Author SHA1 Message Date
Adrian Crum 047036654c Added some convenience methods to GenericHelperInfo.java that will help simplify client code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533171 13f79535-47bb-0310-9956-ffa450edef68
2013-10-17 17:27:51 +00:00
Adrian Crum 4dd795cb50 Code cleanup and small optimization in GenericHelperInfo.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533147 13f79535-47bb-0310-9956-ffa450edef68
2013-10-17 16:42:42 +00:00
Jacques Le Roux 3a116293a3 A slightly modified patch from Gareth Carter for "Fixes for some xml/groovy files" https://issues.apache.org/jira/browse/OFBIZ-5349
Validated all xml files and compiled all groovy files and found a few errors. Look at patch for details

jleroux: For webapptests.xml, I prefered to revert it from r959261 (I saw an issue in my xml editor, did not check more)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1532366 13f79535-47bb-0310-9956-ffa450edef68
2013-10-15 14:51:57 +00:00
Adrian Crum 8615235194 Refactored SecurityFactory implementation - make OFBizSecurity an inner private class, plus some code cleanup.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531602 13f79535-47bb-0310-9956-ffa450edef68
2013-10-12 22:24:13 +00:00
Adrian Crum 6c45957573 Oops, I forgot to remove a debug statement from my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531578 13f79535-47bb-0310-9956-ffa450edef68
2013-10-12 18:58:59 +00:00
Adrian Crum 57816747d7 Refactored SecurityFactory implementation - use Java's ServiceLoader to discover Security implementations, instead of using configuration files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531577 13f79535-47bb-0310-9956-ffa450edef68
2013-10-12 18:54:59 +00:00
Adrian Crum 54d2cdba1a Removed unused META-INF folder from security component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531576 13f79535-47bb-0310-9956-ffa450edef68
2013-10-12 18:52:39 +00:00
Jacques Le Roux 0381244267 This completes r1530237 where fieldtypepostnew.xml has been removed.
* Removes useless commented out blocks of <group-maps in <delegators definitions
* Removes now useless localpostnew <datasource definition
* Default the result-fetch-size attribute to 50, and comment about older unsupported versions of jdbc drivers

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531269 13f79535-47bb-0310-9956-ffa450edef68
2013-10-11 12:21:51 +00:00
Adrian Crum 771000f8f0 Allow redefinition of view entities. XML schema change only - implementation exists already.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530976 13f79535-47bb-0310-9956-ffa450edef68
2013-10-10 13:41:45 +00:00
Adrian Crum e41bb48e71 Added XML schema location to UI label file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530825 13f79535-47bb-0310-9956-ffa450edef68
2013-10-09 22:59:17 +00:00
Jacques Le Roux 6e93e48ea3 Renames owasp-esapi-full-java-1.4.jar to owasp-esapi-full-java-1.4-patched-by-OFBIZ-3135.jar to reflect the reality
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530678 13f79535-47bb-0310-9956-ffa450edef68
2013-10-09 15:31:16 +00:00
Adrian Crum 27f77678ef New feature - add placeholder to form widget. Patch contributed by Sumit Pandit.
https://issues.apache.org/jira/browse/OFBIZ-5341


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530656 13f79535-47bb-0310-9956-ffa450edef68
2013-10-09 14:54:40 +00:00
Adrian Crum 53be886210 Some work on the Security component:
1. Some code cleanup and optimization in OFBizSecurity.java. We can use the entity condition cache now that the cache has been fixed.

2. Added @Override annotations to methods that implement the interface.

3. Flagged some Security interface methods as deprecated because they are implementation-specific. If the idea is to have a pluggable Security implementation, then the interface should not reference the entity-engine-based implementation - because a replacement implementation might not use the entity engine.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530471 13f79535-47bb-0310-9956-ffa450edef68
2013-10-09 00:50:22 +00:00
Jacques Le Roux c8ce55ecc9 A patch from Anahita Goljahani for Fixed mispelling of "occurred" https://issues.apache.org/jira/browse/OFBIZ-5342
jleroux: this includes a safe change in jquery.validate.js and jquery.validate.min.js

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530341 13f79535-47bb-0310-9956-ffa450edef68
2013-10-08 16:35:40 +00:00
Jacques Le Roux e5791f84bf SAP changes for CC date type was missing at r1530235
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530238 13f79535-47bb-0310-9956-ffa450edef68
2013-10-08 11:40:22 +00:00
Jacques Le Roux d7de823054 As suggested on dev ML: merges fieldtypepostgres.xml and fieldtypepostnew.xml and finally removes fieldtypepostnew.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530237 13f79535-47bb-0310-9956-ffa450edef68
2013-10-08 11:39:08 +00:00
Jacques Le Roux 8fcd9e7ad7 Fix a bug reported by Anahita Goljahani on dev ML
At r1529674 I forgot that CC numbers are encoded in DB and CC dates are not 4 (1013) but 7 chars (10/2013)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530235 13f79535-47bb-0310-9956-ffa450edef68
2013-10-08 11:36:07 +00:00
Jacques Le Roux a0c34848cf Makes the documentation more legible
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1529933 13f79535-47bb-0310-9956-ffa450edef68
2013-10-07 15:07:25 +00:00
Adrian Crum 0a48201604 There is some confusion over maximum email address length due to conflicting RFCs. So, we will accept the longest length specified and let the email servers decide what they will accept.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1529838 13f79535-47bb-0310-9956-ffa450edef68
2013-10-07 13:31:55 +00:00
Jacques Le Roux 3ca4b45d8f Same restriction for email addresses than recently done for url. An email address is now definitively no more than 254 characters:
https://en.wikipedia.org/wiki/Email_address#Syntax
http://stackoverflow.com/questions/386294/what-is-the-maximum-length-of-a-valid-email-address#answer-574698
Also a CC number and date are respectively no more than 19 and 4 digits: https://en.wikipedia.org/wiki/ISO/IEC_7813

I decided to not limit the tel numbers (now 60 chars seems plenty enough), maybe someone will even needs to increase in a far future :)

While at it, normalises fieldtypepostnew.xml:
* Removes confusing comment in header
* Restricts most types like in fieldtypepostgres.xml (no needs to have them longer), but keep unlimited (actually 2GB max): comment, description


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1529674 13f79535-47bb-0310-9956-ffa450edef68
2013-10-06 20:03:12 +00:00
Adrian Crum 684d49d8b1 Updated the Hypersonic SQL support in the entity engine.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1529644 13f79535-47bb-0310-9956-ffa450edef68
2013-10-06 16:35:50 +00:00
Adrian Crum a04a0a2746 Increased the "url" field type to 2000 characters.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1529637 13f79535-47bb-0310-9956-ffa450edef68
2013-10-06 15:57:31 +00:00
Jacques Le Roux a878016f4e No functional changes, just better log info
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1528882 13f79535-47bb-0310-9956-ffa450edef68
2013-10-03 14:17:44 +00:00
Jacopo Cappellato 42225c7cb0 Improved label translation for the English language.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527997 13f79535-47bb-0310-9956-ffa450edef68
2013-10-01 09:33:37 +00:00
Jacques Le Roux 946163e034 Completes r1527956
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527981 13f79535-47bb-0310-9956-ffa450edef68
2013-10-01 09:09:46 +00:00
Adrian Crum 91294728c2 Fixed a problem with bad try-catch-finally nesting and transaction handling in GenericDelegator.
1. The only exception caught was GenericEntityException, so any other thrown exception was missed - meaning the transaction was committed and GenericDelegator acted as if nothing was wrong.

2. The commit was performed in the finally block, so it was ALWAYS performed - even after an exception was thrown and the transaction was rolled back.

We managed to get away with this all along because typically there is a wrapping transaction that clears it all up. But still, the Delegator code needs to handle transactions correctly.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527810 13f79535-47bb-0310-9956-ffa450edef68
2013-09-30 22:43:02 +00:00
Adam Heath 7b3d3f6be9 There are some controller.xml entries that have a name of "none"; those
should be preferred as valid responses, instead of always assuming that
none means do nothing.

This fixes the issue reported in OFBIZ-5304.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527754 13f79535-47bb-0310-9956-ffa450edef68
2013-09-30 19:57:13 +00:00
Adrian Crum d64e8c0c7c Fixed a subtle flaw in the GenericDelegator.findOne method. When a database query returns no result, GenericValue.NULL_VALUE is put in the pk cache - so future findOne calls will know the entity value doesn't exist. But the findOne method never checked for GenericValue.NULL_VALUE in cache gets, so the database was queried again for an entity value we already know doesn't exist.
https://issues.apache.org/jira/browse/OFBIZ-5332


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527626 13f79535-47bb-0310-9956-ffa450edef68
2013-09-30 16:13:03 +00:00
Adrian Crum 8117cb5756 Small change to GenericDelegator.findOne method - moved the primary key validation check to the beginning of the method.
I believe the original intention was to perform the validation check after the EV_VALIDATE ECAs were run, but the primary key was being used in three method calls before that happened - so those methods could have been passed an invalid primary key.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527609 13f79535-47bb-0310-9956-ffa450edef68
2013-09-30 15:15:35 +00:00
Adrian Crum 55f80f4fd9 Replaced HashSet with LinkedHashSet in UtilMisc.java to preserve original ordering. Suggested by Leon on the dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1527212 13f79535-47bb-0310-9956-ffa450edef68
2013-09-28 18:24:53 +00:00
Jacques Le Roux 438fb59265 Puts a better comment in templates/web.xml
Remove useless and confusing websiteId in web.xml files

I did not remove some others, but I believe they don't make sense as they are.
Take for instance those data
<WebSite webSiteId="EBAY_STORE1" siteName="eBay Store1" standardContentPrefix="http://demo.ofbiz.org" productStoreId="90101"/>
<WebSite webSiteId="EBAY_STORE2" siteName="eBay Store2" standardContentPrefix="http://demo.ofbiz.org" productStoreId="90102"/>
<WebSite webSiteId="GOOGLEBASE" standardContentPrefix="http://demo.ofbiz.org" productStoreId="9000" />

Sorry but http://demo.ofbiz.org/ leads nowhere!

And do we need to keep those referring to productStoreId="9000" in web.xml files? They have not their own webapps
<WebSite webSiteId="CmsSite" siteName="CMS Web Site"/>
<WebSite webSiteId="OfbizSite" siteName="OFBiz Web Site"/>
<WebSite webSiteId="GOOGLECHECKOUT" productStoreId="9000" />
<WebSite webSiteId="GOOGLECHECKOUT" productStoreId="9000" />

I think we should keep in web.xml files, only ecommerce/clone and webPos (uses POS store)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526686 13f79535-47bb-0310-9956-ffa450edef68
2013-09-26 21:07:10 +00:00
Jacques Le Roux 0ef1ff543e Reverts revisions: 1525909 + 1526533 + 1526560, OFBIZ-4794 is not yet ready
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526583 13f79535-47bb-0310-9956-ffa450edef68
2013-09-26 15:44:40 +00:00
Jacques Le Roux 59f4630664 Set different ports for testing in a CI environment (e.g. Jenkins) https://issues.apache.org/jira/browse/OFBIZ-4794
Complete previous work because of INFRA-6790

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526533 13f79535-47bb-0310-9956-ffa450edef68
2013-09-26 14:58:47 +00:00
Jacques Le Roux 9007023c7f A patch from Leon for "trivial errors corrections to fieldlookup.js" https://issues.apache.org/jira/browse/OFBIZ-5330
Correct following trivial issues:
1. in lookupDescriptionLoaded.prototype.update, not assign the form when try to get filed object by its name
2. in setSourceColor, variable "target" should be given parameter "src"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526456 13f79535-47bb-0310-9956-ffa450edef68
2013-09-26 12:15:52 +00:00
Jacques Le Roux 53ccd2ceb7 Fixes "Overview of routings does not paginate" https://issues.apache.org/jira/browse/OFBIZ-5322 and more
Actually it does paginate but the value is not dependent on widget property widget.form.defaultViewSize which default value is 20. It uses a default value of 50 which is defined by

<set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="3"/>

You can easily test it using https://localhost:8443/manufacturing/control/FindRouting?VIEW_SIZE=3

This is legacy from pre Apache era. I found 143 cases where a default-value is defined in screens for VIEW_SIZE.

I did not look into details for the 143 cases but I believe most are also legacy.
There are few default values: 10, 20, 30, 50, 500 and even an extreme case of 10000 for InventoryItemTotalsExport!
There is only one comment for LookupBulkAddProducts which is also legacy: <!-- 10 rows seems more appropriate given screen size, etc. -->

I suggest to OOTB replace all those by the widget.form.defaultViewSize value.
Things will then be consistent and easily changeable on a global scale using the widget property.
Or if really needed forcing the default-value as it's done now.

So this would be applied on the 143 cases (I checked, viewSizeDefaultValue does not exist in any screen)

<property-to-field resource="widget" property="widget.form.defaultViewSize" field="viewSizeDefaultValue"/>
<set field="viewSize" from-field="parameters.VIEW_SIZE" type="Integer" default-value="${viewSizeDefaultValue}"/>

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526387 13f79535-47bb-0310-9956-ffa450edef68
2013-09-26 05:55:32 +00:00
Adrian Crum 0f5a7c45e0 Moved one entity-resource definition in the common component - so all geo-related definitions are in one group. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526299 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 20:58:09 +00:00
Adrian Crum 58bdfa3254 Remove dependency of webapp component on geo-related entities. This will make it easier to exclude geo-related functionality in a framework-only installation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526298 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 20:51:33 +00:00
Adrian Crum 359e19722c Move geo-related seed data to the GeoData.xml file. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526296 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 20:46:40 +00:00
Adrian Crum 6c40bc0c3b Reorganized some Geo-related service definitions. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526292 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 20:35:58 +00:00
Adrian Crum 7df7c9952f Fixed a warning caused by a framework dependency on the Party component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526276 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 19:57:13 +00:00
Adrian Crum d5511e39cd Small code cleanup and optimization in ModelEntityChecker.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1526226 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 16:44:16 +00:00
Jacques Le Roux c86a579cf8 Set different ports for testing in a CI environment (e.g. Jenkins) https://issues.apache.org/jira/browse/OFBIZ-4794
*What's for?*
OOTB the port offset is interesting in at least 3 cases:
# To simultaneously run tests on the same Buildbot machine. This is related to http://mail-archives.apache.org/mod_mbox/www-builds/201209.mbox/%3C002101cd991b$0a16de50$1e449af0$@16degrees.com.au%3E
# To simultaneously run the demos without having to change much things, just one parameter
# To eventually run Sonar on OFBiz sources https://issues.apache.org/jira/browse/INFRA-3590

*How it's done?*
Basically, I just added a portoffset integer parameter to some ant targets (of course this JVM param can also be used in a Java call from command line):
* in trunk and R13.07: start, start-batch, start-debug, start-pos, start-both, run-tests and run-test
* in R12.04 and R11.04: run-tests, run-test. I did not set start targets because anyway it would miss the admin port offset, withouh much changes. So can't be used to demonstrate. We will continue to use the current paches for those.

The portoffset parameter is set to zero by default in ClassLoaderContainer.java. 
If a value is passed, it's then grabed by Config.java and passed to ClassLoaderContainer.java, where it's set to this value.

 The portoffset is then used to change in one shoot all the default ports values defined (in config or hardcoded), and the admin port value in R13.07 and trunk.
This is done in following classes:
CatalinaContainer
NamingServiceContainer
ServiceEngine through ServiceLocation
RmiServiceContainer
XMLRPCClientEngine
XmlRpcTests

To avoid hardcoding locations in services definitions, I also had to create some service-locations: main-local-soap and main-remote-soap 

*What are the constraints?*
* For demos: the offset should not be applied to trunk because <service-location name="main-remote-soap" location="http://demo-trunk.ofbiz.apache.org:8080/webtools/control/SOAPService"/> is used for tests by trunk *and all releases*. It's useless to apply to trunk anyway,  offsetting port in releases is enough.
* I did not take into account the Ideal payment harcoded port values in IdealPaymentServiceTest.java. Weirdly I did not cross error during tests, though it seems there are tests using an harcoded port in url.

*What is the status?*
Locally (on Win XP)  I ran many tests combinations with <<ant load-demo run-tests>>.  
Applying the portoffset on a sole running test instance has no effects. I have still some fails (no errors) but those are not related to my changes, they appear also without.
But when I run a combination of any releases/trunk but with R11.04, I get a time out error with testSOAPSimpleService, that I can't explain so far. 
If I run the trunk alone with the portoffset no errors occur. Same if I run a release with portoffset and only testSOAPSimpleService in trunk (w/ or w/o portoffset)

*To summarize:* these changes will be used to run Buildot tests instances simultaneously . And, for coming releases, to run demos without having to create patches. Simply running ant start with a portoffset value which will take care of all ports values, including admin port. For running R12.04 demo as stable we will still need to create a patch for the last time.

*What I will to do for now:* commit the patches and test if I cross the same issue on Buildbot. If it's the same (99% chances it will) I will revert and will continue to locally try to find the reason . I believe this issue is unrelated to the changes I implemened.  And it's just because it's now possible to simultaneously run tests that it appears. 

BTW I just noticed that when you run R11.04 with R12.04, R12.04 takes almost all the CPU (XP is not very, while when running any combinations w/o R11.04 the CPU load is shared. 
Also there are far less tests in R11.04, which coul be the reason when I run it with another test run instance there are no issues.  Because R11.04 tests finish before the other instance gets to run testSOAPSimpleService.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1525909 13f79535-47bb-0310-9956-ffa450edef68
2013-09-24 14:47:30 +00:00
Adrian Crum 452b13f2a3 Fixed a bug in the menu widget rendering.
https://issues.apache.org/jira/browse/OFBIZ-5326


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1525605 13f79535-47bb-0310-9956-ffa450edef68
2013-09-23 14:32:32 +00:00
Jacopo Cappellato 367ac26332 Upgraded Fop to 1.1 (the latest bug fix release) and barcode4j to 2.1 (version compatible with Fop 1.1).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524835 13f79535-47bb-0310-9956-ffa450edef68
2013-09-19 20:47:37 +00:00
Jacques Le Roux ff5f0a5096 A patch for "Deprecate doCacheClear in Delegator interface and class and related minilang classes" https://issues.apache.org/jira/browse/OFBIZ-5325
* Deprecates methods in Delegator interface and class
* Deprecates cache clear related variable and methods in EntitySaxReader class
* Deprecates cache clear related variables in minilang related delegator classes
* In simple-method schema annotations, marks do-cache-clear attribute as deprecated 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524704 13f79535-47bb-0310-9956-ffa450edef68
2013-09-19 12:03:47 +00:00
Adrian Crum 572ac66d16 Minor change to GenericDelegator - Put some logging calls inside if blocks.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524183 13f79535-47bb-0310-9956-ffa450edef68
2013-09-17 19:17:49 +00:00
Adrian Crum 252de4230f Fixed a bug in menu rendering, reported by Jacques on the dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524143 13f79535-47bb-0310-9956-ffa450edef68
2013-09-17 17:58:13 +00:00
Adrian Crum 8004ad04c2 JavaDoc fix - no functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524134 13f79535-47bb-0310-9956-ffa450edef68
2013-09-17 17:17:56 +00:00
Adrian Crum 0e1449137d Small improvement to String-to-Date conversion: Accept either JDBC escape format or localized format.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524133 13f79535-47bb-0310-9956-ffa450edef68
2013-09-17 17:16:50 +00:00
Adrian Crum c276d17fa4 Small change to ObjectType.java - log warning on conversion failures so we can see what went wrong.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524132 13f79535-47bb-0310-9956-ffa450edef68
2013-09-17 17:15:20 +00:00