Adrian Crum
767deefce4
New models for the entityengine.xml file. These will be used to replace the DOM caching/parsing code in the same way as the service engine.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490187 13f79535-47bb-0310-9956-ffa450edef68
2013-06-06 08:02:14 +00:00
Adrian Crum
92d007e6f1
XSD-to-Java bug fix - fixed bad class field name.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490144 13f79535-47bb-0310-9956-ffa450edef68
2013-06-06 05:16:08 +00:00
Adrian Crum
a490245e67
XSD-to-Java bug fix - added missing throws clause.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490126 13f79535-47bb-0310-9956-ffa450edef68
2013-06-06 04:25:48 +00:00
Adrian Crum
32f9d30ca7
A final pass through ServiceConfigUtil.java - moved some of the convenience method code to the call sites. The convenience methods don't add much now that the API is easier to use. Reorganized methods and added JavaDocs.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490116 13f79535-47bb-0310-9956-ffa450edef68
2013-06-06 03:29:50 +00:00
Adrian Crum
536a9e2f1f
More work on ServiceConfigUtil.java - based on a patch from Christoph Neuroth with modifications by me. Client code now uses the new models and the DOM parsing static methods have been removed. The serviceengine.xml file handling is now thread-safe.
...
https://issues.apache.org/jira/browse/OFBIZ-5204
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490112 13f79535-47bb-0310-9956-ffa450edef68
2013-06-06 02:16:40 +00:00
Adrian Crum
06aea1b98a
More work on ServiceConfigUtil.java - based on a patch from Christoph Neuroth with modifications by me. The static helper methods now use the models instead of parsing the DOM tree. This commit makes a small API change - the helper methods now throw an exception if there is a problem with the serviceengine.xml file. The original code would just hide the errors, so client code didn't know anything was wrong.
...
https://issues.apache.org/jira/browse/OFBIZ-5204
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490004 13f79535-47bb-0310-9956-ffa450edef68
2013-06-05 18:59:51 +00:00
Adrian Crum
7cfd3f4a3d
Some convenience methods for the new models - based on a patch from Christoph Neuroth with modifications by me.
...
https://issues.apache.org/jira/browse/OFBIZ-5204
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1490002 13f79535-47bb-0310-9956-ffa450edef68
2013-06-05 18:54:13 +00:00
Adrian Crum
c3ceb113ea
More work on ResourceLoader.java:
...
1. ResourceLoader instances are now thread-safe, though the static methods that cache DOM objects are not.
2. Code cleanup and better XML validation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489801 13f79535-47bb-0310-9956-ffa450edef68
2013-06-05 10:38:06 +00:00
Adrian Crum
6073ef6dea
Some first steps in fixing the concurrency issues in ResourceLoader.java.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489748 13f79535-47bb-0310-9956-ffa450edef68
2013-06-05 08:56:58 +00:00
Adrian Crum
89ce6062f6
XSD-to-Java improvement - better discovery of child elements.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489723 13f79535-47bb-0310-9956-ffa450edef68
2013-06-05 06:34:50 +00:00
Jacopo Cappellato
1dc46b9fd7
Some cleanups for my last commit.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489476 13f79535-47bb-0310-9956-ffa450edef68
2013-06-04 15:33:30 +00:00
Jacopo Cappellato
4ae936a5f3
The content rendered in the Webtools "view log" screen is now rendered from the ofbiz.log file rather then the ofbiz.html file in order to provide more control on the html code rendered in the screen. This fixes the vulnerability CVE-2013-2137
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489461 13f79535-47bb-0310-9956-ffa450edef68
2013-06-04 14:48:40 +00:00
Adrian Crum
2dd19d3386
Small fixup for my last commit - remove comments used for development.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489366 13f79535-47bb-0310-9956-ffa450edef68
2013-06-04 10:13:48 +00:00
Adrian Crum
e5eb503602
New feature: Convert an XSD file to Java source code. The feature creates immutable Java object models that represent the XML file defined by the schema. It supports an optional Visitor implementation.
...
The feature can be accessed in Web Tools by clicking on the XSD to Java link.
The Java source code is displayed in a text area - where it can be copied-and-pasted to your IDE. The source code is fairly complete, but you will have to fill in some missing bits.
If anyone wants to adapt the feature to make it a command-line utility, then that would be welcome.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489362 13f79535-47bb-0310-9956-ffa450edef68
2013-06-04 09:52:10 +00:00
Adrian Crum
33f04b40e7
New method for UtilXml.java - convert a DOM node name to a Java field name or Java class name.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1489360 13f79535-47bb-0310-9956-ffa450edef68
2013-06-04 09:41:34 +00:00
Jacques Le Roux
5bffbb20bf
A fixing patch from Leon for "Some enhancement to password change." https://issues.apache.org/jira/browse/OFBIZ-5176
...
This line should not have been changed, "requirePasswordChange" can come from UserLogin not only "request"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488938 13f79535-47bb-0310-9956-ffa450edef68
2013-06-03 09:34:26 +00:00
Adrian Crum
d1723ce249
JobPoller improvement - make it a ServiceConfigListener so service config file changes can be made at run-time. One <thread-pool> attribute doesn't get updated: "jobs" (the queue size) - which would require creating a new ThreadPoolExecutor instance, and that would require a lot of complicated synchronization code.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488736 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 16:25:09 +00:00
Adrian Crum
c7eb2f2622
ServiceConfigUtil improvement - notify listeners when the config file is reloaded.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488727 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 15:03:41 +00:00
Adrian Crum
43751eec49
Small improvement to the new service config models: move thread pool constants to the ThreadPool model, and initialize instances from the constant values.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488715 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 14:25:25 +00:00
Adrian Crum
528059c90d
Improved attribute value validation in ThreadPool.java.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488695 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 12:19:58 +00:00
Adrian Crum
032960984a
Bug fix in new ServiceConfigUtil code - do not use cached DOM object when creating models.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488694 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 12:19:02 +00:00
Adrian Crum
86aef5bf36
Converted JobPoller.java over to the new service config design.
...
https://issues.apache.org/jira/browse/OFBIZ-5204
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488671 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 11:32:30 +00:00
Adrian Crum
38a3319174
Bug fix for NotificationGroup.java - if the <notification-group> element name attribute is being used as the key to a Map, then we should make it required.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488646 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 06:41:54 +00:00
Adrian Crum
59633013b4
Clean up and format service-config.xsd so it is easier to read and understand.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488645 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 06:37:11 +00:00
Adrian Crum
fac18de056
New models for the serviceengine.xml file. They are not used yet - the ServiceConfigUtil class needs to be updated to use them, as well as other code that uses ServiceConfigUtil. The new models were contributed by Christoph Neuroth and were refactored by me.
...
https://issues.apache.org/jira/browse/OFBIZ-5204
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488643 13f79535-47bb-0310-9956-ffa450edef68
2013-06-02 05:15:57 +00:00
Adrian Crum
6e88a24bcb
Fixed some bugs in the form widget column sorting code:
...
1. URL parameters were being mangled by clunky string manipulation code.
2. The sort column logic was piggy-backed on the pagination event. I created a new choice for the form widget <on-event-update-area> element - "sort-column" - so column sort events can update their own areas.
3. The parameter name for the sort column was hard-coded, so column sorting in multiple lists on the same screen would not work. I added a new <form> attribute - "sort-field-parameter-name" - so each list can be sorted separately.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488315 13f79535-47bb-0310-9956-ffa450edef68
2013-05-31 17:07:00 +00:00
Adrian Crum
babfc9bfdd
Small improvement to the Ajax JS functions - allow a complete screen refresh if the specified area ID equals "window". This is helpful for form widgets that have certain events that require a screen update instead of a container update.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1488240 13f79535-47bb-0310-9956-ffa450edef68
2013-05-31 14:10:17 +00:00
Adrian Crum
9b0094f191
Small fix for screen widget <container> element - allow expressions in the auto-update-interval attribute.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1487966 13f79535-47bb-0310-9956-ffa450edef68
2013-05-30 18:48:28 +00:00
Adrian Crum
bd2edf26f6
Fixed a bug in ajaxUpdateAreaPeriodic JS function - the interval parameter is seconds, not milliseconds.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1487923 13f79535-47bb-0310-9956-ffa450edef68
2013-05-30 16:44:23 +00:00
Adrian Crum
7d7407caba
New feature - Column screen widgets. This enables easy layout of multi-column screens/reports. The columns are rendered as <table> elements - so no more broken layouts caused by unpredictable floats, etc.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1487587 13f79535-47bb-0310-9956-ffa450edef68
2013-05-29 18:17:46 +00:00
Jacques Le Roux
33e003d376
Sometimes, when the server is a bit slow, it's enjoyable to know it. This spin waiter will help in those cases
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1487405 13f79535-47bb-0310-9956-ffa450edef68
2013-05-29 08:47:43 +00:00
Adrian Crum
c1cc2308b0
Updated the HTML DOCTYPE declaration - paving the way for HTML5.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1486831 13f79535-47bb-0310-9956-ffa450edef68
2013-05-28 09:21:36 +00:00
Adrian Crum
57205498d6
Fixed some FIXMEs in MacroFormRenderer.java.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1486828 13f79535-47bb-0310-9956-ffa450edef68
2013-05-28 09:14:42 +00:00
Adrian Crum
a67fd498c1
Clean up code formatting in MacroFormRenderer. No functional change.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1486784 13f79535-47bb-0310-9956-ffa450edef68
2013-05-28 07:11:39 +00:00
Adrian Crum
f1a85663d1
Entity engine optimization: Use SELECT * when the fields to select have not been specified.
...
There was some code to check for this, but it was testing a "fields to select" List that was never empty, so SELECT * was never used.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1486552 13f79535-47bb-0310-9956-ffa450edef68
2013-05-27 09:49:02 +00:00
Jacques Le Roux
334c716283
Add a mean to collect and show the Requests Events durations using Metrics https://issues.apache.org/jira/browse/OFBIZ-5198
...
This has involuntarily slipped in, thanks to Adrian who reviewed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1485620 13f79535-47bb-0310-9956-ffa450edef68
2013-05-23 09:05:38 +00:00
Jacques Le Roux
eb9f05e7aa
Add a mean to collect and show the Requests Events durations using Metrics https://issues.apache.org/jira/browse/OFBIZ-5198
...
Fulfill the goal with some more:
* makes the Metrics main parameters (estimationSize, estimationTime and smoothing) dynamically changeable (added in serverstats.properties)
* there is no threshold handling for event metrics
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1485601 13f79535-47bb-0310-9956-ffa450edef68
2013-05-23 07:55:14 +00:00
Adrian Crum
fa77ee6655
Fixed a bug in the entity engine pk cache where view entities went stale - https://issues.apache.org/jira/browse/OFBIZ-5192 .
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484279 13f79535-47bb-0310-9956-ffa450edef68
2013-05-19 12:29:44 +00:00
Adrian Crum
00e0e6555d
Fixed a problem in Web Tools that was caused by recent entity model changes.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484268 13f79535-47bb-0310-9956-ffa450edef68
2013-05-19 10:58:14 +00:00
Adrian Crum
e0ccd44b0f
Small improvement to the Performance Metrics feature - sort by name the list of metrics.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484150 13f79535-47bb-0310-9956-ffa450edef68
2013-05-18 17:31:45 +00:00
Adrian Crum
e5099432a0
Fixed a bug in the performance metrics feature where the wrong request Map was being updated in some cases.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484145 13f79535-47bb-0310-9956-ffa450edef68
2013-05-18 16:46:01 +00:00
Adrian Crum
9bd42ec3a2
Reverted revision 1483822.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1484134 13f79535-47bb-0310-9956-ffa450edef68
2013-05-18 16:12:50 +00:00
Jacques Le Roux
929a06dfd5
Improves the Metrics stats by adding a new column used only by requests. It's quite useful to measure the real (not smoothed) durations of events in notably *chained* requests.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1483822 13f79535-47bb-0310-9956-ffa450edef68
2013-05-17 14:21:02 +00:00
Jacques Le Roux
8ca89fc25d
Reverts r1482796 and comments about no current implementation rather than removing attributes
...
Thanks to Jacopo's comment in dev ML
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482911 13f79535-47bb-0310-9956-ffa450edef68
2013-05-15 15:38:43 +00:00
Jacques Le Roux
3abb2933d6
When I moved XA Pool to the Attic I forgot to remove these XA Pool specific attributes. They were now misleading.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482796 13f79535-47bb-0310-9956-ffa450edef68
2013-05-15 12:50:54 +00:00
Adam Heath
7b9961afcd
FEATURE: In NoTransaction.call, completely unwrap all nested exceptions, and re-wrap the innermost one. This is just like InTransaction.call.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482509 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 18:09:38 +00:00
Adam Heath
952e43cdb5
FEATURE: When calling services from an incoming http requests, allow for a different request and session attribute name to be specified.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482508 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 18:09:31 +00:00
Adam Heath
8133384848
FEATURE: Add TimestampToString converter; this parallels the existing StringToTimestamp implementation.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482507 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 18:09:22 +00:00
Adam Heath
01822c38e0
FEATURE: Add safeAdd, which protects against BigDecimal addition when the right operand is null.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482506 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 18:09:16 +00:00
Adam Heath
a4b4054c77
FEATURE: Remove use of empty ArrayList/HashMap, instead using
...
Collections emptyList/emptyMap.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482441 13f79535-47bb-0310-9956-ffa450edef68
2013-05-14 16:38:30 +00:00