Commit Graph
27737 Commits
Author SHA1 Message Date
Adrian Crum 3f673c7bfe Allow JSONWriter to handle Iterators.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533927 13f79535-47bb-0310-9956-ffa450edef68
2013-10-20 16:54:32 +00:00
Jacques Le Roux c386f6ab30 Set different ports for testing in a CI environment (e.g. Jenkins) https://issues.apache.org/jira/browse/OFBIZ-4794
*What's for?*
Finally, OOTB the port offset is interesting in 2 cases:
# To eventually run Sonar on OFBiz sources https://issues.apache.org/jira/browse/INFRA-3590
# To simultaneously run the demos without having to change much things, just one parameter (this will need to have the same commited in R13.07... to be discussed...)

Of course, It can be used for other purposes outside of the ASF context...

*How it's done?*
Basically, I just added a portoffset integer parameter to 3 ant targets (of course this JVM param can also be used in a Java call from command line): start, start-pos, start-both,

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
This is done in following classes:
CatalinaContainer
NamingServiceContainer
ServiceEngine through ServiceLocation
RmiServiceContainer
XMLRPCClientEngine
XmlRpcTests

To avoid hardcoding locations in services definitions, I also created 2 service-locations: main-http and main-soap

*To summarize:* these changes will be used to run "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. R13.07 could have a similar patch applied since it's not yet released...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533839 13f79535-47bb-0310-9956-ffa450edef68
2013-10-19 22:07:35 +00:00
Adrian Crum a2c1465efd Fixed a bug in the entity tests - JUnit expected and actual arguments were reversed in the testTransactionUtilRollback test.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533542 13f79535-47bb-0310-9956-ffa450edef68
2013-10-18 16:34:09 +00:00
Adrian Crum 4b75f74431 Fixed some flaws in the JDBC password handling code. Improved JavaDocs in updated code.
The original code would provide a null or empty password (depending on code branching) if no password was configured, so I wasn't able to determine what the desired behavior was. Now an exception is thrown if there is no JDBC password, and datasource connection attempts fail gracefully.

If we want to support 'authenticationless' JDBC connections, then this will need to be looked at again.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1533202 13f79535-47bb-0310-9956-ffa450edef68
2013-10-17 18:33:49 +00:00
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
Jacopo Cappellato 008611ef63 Misc fixes and renamed indexTree service/event/methods to indexContentTree in order to be more descriptive on their role in the system.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1532369 13f79535-47bb-0310-9956-ffa450edef68
2013-10-15 14:55:03 +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
Jacques Le Roux e23c626113 This fixes
"Addition of item to shopping list is not working" https://issues.apache.org/jira/browse/OFBIZ-4903
"Problem when saving a product to a shopping list" https://issues.apache.org/jira/browse/OFBIZ-4589
I don't pretend it's glorious code. For instance I gave up on trying to have the groovy changes snippets consistent in both components and to reuse the way it's done in party. And the way I secured the indexes remember me when I was hacking in APL. For my defense, it was really a mess... and my time is limited...
Anyway, at least it fixes all the issues I crossed in shopping list editing in both party and ecommerce components:
* NPE on sessions ending
* wrong and failing (NPE in ftl) pagination
* error on pagination links after adding a product

Tested with both 2 and 20 size view on both sides


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1532342 13f79535-47bb-0310-9956-ffa450edef68
2013-10-15 14:03:54 +00:00
Jacques Le Roux f32d671584 This still missed the UtilProperties import after r1531876
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1532284 13f79535-47bb-0310-9956-ffa450edef68
2013-10-15 10:52:50 +00:00
Jacopo Cappellato 044acebb72 Refactored and simplified the old code to index Content record: it now leverages the new LuceneDocument interface and index handling facilities.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1532273 13f79535-47bb-0310-9956-ffa450edef68
2013-10-15 10:13:11 +00:00
Jacopo Cappellato d45d6a6fe6 Refactoring of Lucene product indexing: separated logic that is product specific from indexing logic that is independent from products; in this way it will be easy to index other content or customize the existing one, by implementing new LuceneDocument classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1532241 13f79535-47bb-0310-9956-ffa450edef68
2013-10-15 08:28:08 +00:00
Jacopo Cappellato a8c3885e16 Implemented a series of ecas to submit for indexing products when product related information is added/updated/deleted.
Thanks to Scott Gray for the initial implementation of these ecas.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531918 13f79535-47bb-0310-9956-ffa450edef68
2013-10-14 14:42:53 +00:00
Jacques Le Roux 59774c4d80 I made a typo in the signature of UtilProperties.getPropertyValue() in my last commit, the last parameter is a String
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531876 13f79535-47bb-0310-9956-ffa450edef68
2013-10-14 12:37:03 +00:00
Jacques Le Roux a0dcb59884 Avoids fixed view sizes and provides default value in case of missing property
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531874 13f79535-47bb-0310-9956-ffa450edef68
2013-10-14 12:20:01 +00:00
Jacques Le Roux d76c2a3872 Orders imports, no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531873 13f79535-47bb-0310-9956-ffa450edef68
2013-10-14 12:17:08 +00:00
Jacopo Cappellato ad8b3bf1c9 Fixed bug reported by Simon Maskell in OFBIZ-5344 with a slightly different patch than the one provided by Simon.
Also added a TODO comment to warn that the current logic doesn't work well for LIFO/FIFO.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531848 13f79535-47bb-0310-9956-ffa450edef68
2013-10-14 10:56:24 +00:00
Jacques Le Roux f95cbbd792 Reverts r1531030 at Jacopo's request related to "Shipment cancellation doesn't revert inventory accounting quantity total" https://issues.apache.org/jira/browse/OFBIZ-5314
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531847 13f79535-47bb-0310-9956-ffa450edef68
2013-10-14 10:51:13 +00:00
Jacques Le Roux ead469fa39 Better labels
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531842 13f79535-47bb-0310-9956-ffa450edef68
2013-10-14 10:30:45 +00:00
Jacques Le Roux aa377c1728 Fixes the comment, this is really easier to read
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531841 13f79535-47bb-0310-9956-ffa450edef68
2013-10-14 10:26:47 +00:00
Jacques Le Roux a242e12f38 No functional change, fixes comment and log
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531834 13f79535-47bb-0310-9956-ffa450edef68
2013-10-14 09:46:16 +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
Jacopo Cappellato 946ea312d3 Updated the "lucene" specialpurpose component to the latest version of Lucene (4.5).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531504 13f79535-47bb-0310-9956-ffa450edef68
2013-10-12 05:17:29 +00:00
Jacopo Cappellato 3040cad755 Expanded and enhanced the "lucene" specialpurpose component by implementing an initial version of a Product indexer; also implemented a screen to test and analyze Lucene queries on the index.
Many thanks to Scott Gray for the initial version of the indexer and the code to prepare the Product document.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531499 13f79535-47bb-0310-9956-ffa450edef68
2013-10-12 04:52:17 +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
Jacques Le Roux 74bb7c945a A patch from Christian Carlow for "Shipment cancellation doesn't revert inventory accounting quantity total" https://issues.apache.org/jira/browse/OFBIZ-5314
When order items are issued to a shipment, the accounting_quantity_total
for the corresponding inventory records are updated but afterwards when
the shipment is cancelled, the accounting_quantity_total is not reverted
back to the original values.  Is this a bug or is there a reason the
quantity is not reverted?

The problem is that when I try to create another shipment and issue the
same quantity, I receive the following error:

The following error occurs when I try to issue the same previously
cancelled quantity to a newly created shipment:

Error:<br/> ERROR: Could not complete the Issue OrderItemShipGrpInvRes
to Shipment
[file:/dev/apache-ofbiz-11.04.02/applications/product/script/org/ofbiz/shipment/issuance/IssuanceServices.xml#issueOrderItemShipGrpInvResToShipment]
process [problem removing the orderItemShipGrpInvRes value: The current
transaction is marked for rollback, not beginning a new transaction and
aborting current operation; the rollbackOnly was caused by: Error in
simple-method [Create an accounting transactions for a sales shipment
issuance (D: INVENTORY_ACCOUNT, C: COGS_ACCOUNT)
[file:/home/stan/dev/apache-ofbiz-11.04.02/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml#createAcctgTransForSalesShipmentIssuance]]:
; {Could not find enough accounting inventory for product DOUGH;
remaining quantity: 1}] <br/> <br/>

The service is looking for inventory_item records with an
accounting_quantity_total > 0 but finds none because the quantity was
decremented to 0 from the cancelled shipment issuance.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1531030 13f79535-47bb-0310-9956-ffa450edef68
2013-10-10 15:43:42 +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
Jacopo Cappellato bbc04dfaf6 Removed redundant attributes; thanks to Adrian Crum for the review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530972 13f79535-47bb-0310-9956-ffa450edef68
2013-10-10 13:29:44 +00:00
Jacopo Cappellato dfdec15fc4 Fixed Minilang validation error (missing result-name attributes) introduced by my recent commit rev. 1530273
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530876 13f79535-47bb-0310-9956-ffa450edef68
2013-10-10 08:42:36 +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
Jacopo Cappellato 1bf93f758e For backward compatibility: when a time period is closed, and a GlAccountHistory record for the same is already present (old mode, before revision 1530273), do not return an error and instead fill the balance fields of the record.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530634 13f79535-47bb-0310-9956-ffa450edef68
2013-10-09 14:35:52 +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
Jacopo Cappellato 3874109539 A pretty important refactoring of some GL data and code that fixes a series of long standing gaps, errors and design issues affecting account balances and the closure of fiscal periods (some of them introduced by me when I initially wrote the first version of these business logics; at that time I didn't have a clear and deep enough understanding of these accounting rules sigh…).
This new version is cleaner (less code, less redundancy of information), correct and it also resolves some pretty relevant issues (including some db deadlock errors) affecting performance in instances with medium/high number of GL postings.
Here is a list of changes introduced in this commit:
* removed the postedBalance field from GlAccount and GlAccountOrganization: this was a wrong design; the field in GlAccount was not used by the applications; the field in GlAccountOrganization was used but not consistently
* added openingBalance field to GlAccountHistory: now this entity has full information about an account in a financial period after the period closed (opening and ending balance, posted debits and credits); now the endingBalance is computed correctly both for Debits and Credits accounts
* updated demo data for the data model changes mentioned above
* the business logic to compute the account balances is now implemented in a service (computeGlAccountBalanceForTimePeriod) and reused consistently
* removed several FIXME/TODO comments now that the new code addresses the related gaps and issues
* removed some old, incorrect or no more used artifacts: getGlAcctgOrgWithPostedBalanceSplit (service), getNetBalance (utily methods)
* refactored the TrialBalanceReport and GlAccountTrialBalance reports and related pdf versions: the new versions have cleaner code and show the correct balances both for debits and credits
* fixed a series of Groovy compilation issues due to missing imports


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1530273 13f79535-47bb-0310-9956-ffa450edef68
2013-10-08 13:49:19 +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 27632c6acb OFBIZ-5241-ACCTG-Labels.patch from Pierre Smits for "Have PIN payment transactions" https://issues.apache.org/jira/browse/OFBIZ-5241
In the Dutch market space it is customary to pay with pin. This should be incorporated

jleroux:same in France where we use smart card since it was invented 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1529693 13f79535-47bb-0310-9956-ffa450edef68
2013-10-06 21:25:00 +00:00
Jacques Le Roux 23be78e01b I missed this one in r1519245
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1529688 13f79535-47bb-0310-9956-ffa450edef68
2013-10-06 20:57:40 +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
Jacques Le Roux a232e7ce18 Adds dependencyCheck.groovy locally (not in repo) to be used later
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1529669 13f79535-47bb-0310-9956-ffa450edef68
2013-10-06 19:22:56 +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