Commit Graph
185 Commits
Author SHA1 Message Date
Jacques Le Roux 2777b83223 Fix r885091 where isNotEmpty has been used by error instead of isEmpty
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885092 13f79535-47bb-0310-9956-ffa450edef68
2009-11-28 13:59:45 +00:00
Jacques Le Roux 5d4b9b5982 More uses of isEmpty(expr) instead of (expr == null) || (expr.size() == 0
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@885091 13f79535-47bb-0310-9956-ffa450edef68
2009-11-28 13:31:52 +00:00
Jacques Le Roux c72b29cb1f Use UtilValidate.isNotEmpty methods instead of (obj != null) || (obj.length > 0) and (obj != null) || (obj.size > 0)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883549 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 23:41:34 +00:00
Jacques Le Roux e839974fe7 Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.length == 0)
Complete r883507


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883508 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 21:48:18 +00:00
Jacques Le Roux 4e0d303e06 Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.length == 0)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883507 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 21:42:18 +00:00
Adam Heath 820d11eb97 Deprecate UtilCache constructors, and add a create helper function.
This is the first step to making utilCacheTable concurrent, and
non-blocking.  To do so, the constructor has to have no side-effects.
This means it can't modify utilCacheTable itself; this will be moved to
the helper function created above.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883217 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 02:56:28 +00:00
Jacques Le Roux c6f42723e5 A patch from Marc Morin "Resolve java warnings exposed in Eclipse : framework - minilang" (https://issues.apache.org/jira/browse/OFBIZ-3115) - OFBIZ-3115
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@833092 13f79535-47bb-0310-9956-ffa450edef68
2009-11-05 17:30:46 +00:00
Scott Gray aa6d7bcd67 Catch ClassCastExceptions in <store-value/> operations, these will occur if you have a null GenericValue (perhaps from a lookup that returned no results), set some fields on it and then try to store it. What you actually have at that point is a FastMap created when you set the fields.
Also added use of the utility MethodContext.setErrorReturn(String, SimpleMethod) rather than manually adding errors to the environment context.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@826322 13f79535-47bb-0310-9956-ffa450edef68
2009-10-18 00:34:29 +00:00
Adrian Crum 9ee18d37c5 Updated client code to use the new Delegator factory method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@823633 13f79535-47bb-0310-9956-ffa450edef68
2009-10-09 17:44:24 +00:00
Jacques Le Roux 592440841b No functional changes only in documentation : replace some value-name per value-field plus remove some wrong dashes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@822659 13f79535-47bb-0310-9956-ffa450edef68
2009-10-07 10:54:11 +00:00
Adrian Crum 7fa08f9079 Replaced GenericDelegator.getGenericDelegator(...) calls with new factory method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@821649 13f79535-47bb-0310-9956-ffa450edef68
2009-10-05 01:53:50 +00:00
Adrian Crum a4d68934c9 Converted GenericDelegator concrete class references to Delegator interface references.
This commit requires ant clean. Also, external libraries that reference GenericDelegator will need to be updated.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@821643 13f79535-47bb-0310-9956-ffa450edef68
2009-10-05 00:08:27 +00:00
Adam Heath 5af665e7a4 Based on OFBIZ-891, allow Iterate to handle java.util.Iterator.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@815936 13f79535-47bb-0310-9956-ffa450edef68
2009-09-16 19:33:44 +00:00
Adam Heath a88ea227a9 Protect closing of the EntityListIterator inside a finally block.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@814251 13f79535-47bb-0310-9956-ffa450edef68
2009-09-12 23:23:49 +00:00
Adrian Crum 74ea95889c Reverted rev 802567.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@812692 13f79535-47bb-0310-9956-ffa450edef68
2009-09-08 20:56:14 +00:00
Adam Heath 0d2943ef0e Fix a generics warning.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@812319 13f79535-47bb-0310-9956-ffa450edef68
2009-09-08 02:00:55 +00:00
Hans Bakker e0ba7104ce create a 'set' of documents: a technical and a user guide and added more info
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@812021 13f79535-47bb-0310-9956-ffa450edef68
2009-09-07 07:31:11 +00:00
Jacques Le Roux 7befd1d25e no tabs but 4 spaces in code files (*.ftl, *.gro*, *.java, *.xml)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@804935 13f79535-47bb-0310-9956-ffa450edef68
2009-08-17 11:01:25 +00:00
Jacques Le Roux 30e61ba8f8 Same error than in r763199 (and I knew that, sorry)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@804896 13f79535-47bb-0310-9956-ffa450edef68
2009-08-17 08:23:25 +00:00
Jacques Le Roux 4c442ee379 Some fusiness
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@804895 13f79535-47bb-0310-9956-ffa450edef68
2009-08-17 08:20:38 +00:00
Adrian Crum 6786aa4dbc Refactored GenericDelegator:
1. Converted GenericDelegator to an interface. We already have DelegatorInterface, but it isn't being used anywhere. Removed DelegatorInterface.java.

2. Extracted the static, cached data from the GenericDelegator implementation and put it in its own class - DelegatorData. The GenericDelegator implementation holds a reference to the DelegatorData instance. This makes it possible to have per-thread instances of GenericDelegator.

3. Replaced the ThreadLocal variables with regular variables. ThreadLocal variables are no longer needed. Client code doesn't need to be concerned with pushing and popping the GenericDelegator state.

This commit paves the way for the forthcoming ExecutionContext.

User modifications will have to replace GenericDelegator.getGenericDelegator(...) with DelegatorFactory.getGenericDelegator(...). Also, replace the push code with the new setXxx methods, and remove the pop code. If modifications used DelegatorInterface, replace that with GenericDelegator.

Aside from those changes, this commit is backwards compatible.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@802567 13f79535-47bb-0310-9956-ffa450edef68
2009-08-09 18:04:26 +00:00
Adrian Crum e4ee374a66 Conversion from java.util.Calendar to com.ibm.icu.util.Calendar. I didn't convert the Cloud component - I wasn't sure if the Calendar class was being passed through SOAP.
OFBiz users who have modifications or add-ons can make the same substitution to get them to compile.

I'll let the dust settle from this, then I'll add the user-selected calendar capability.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@792987 13f79535-47bb-0310-9956-ffa450edef68
2009-07-10 15:39:21 +00:00
David E. Jones 497a7cbf0d Change to handling of error messages in simple-methods called as a service to pass errors through in List/Map and not combine into one big String, add text you can't change, etc; now logs details and passes errors as-is
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@792633 13f79535-47bb-0310-9956-ffa450edef68
2009-07-09 18:51:00 +00:00
David E. Jones 49e725e73e Fixed issue discovered and fixed and reported by Ian Tabangay, thanks Ian
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@792422 13f79535-47bb-0310-9956-ffa450edef68
2009-07-09 06:50:23 +00:00
Scott Gray dec24b29f2 Sorry for the big commit, got a bit carried away.
Added override and deprecated annotations wherever they were missing
Removed the use of any deprecated classes/methods (except OutputFormat in UtilXml)
A few other random generics and misc. cleanups

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@791212 13f79535-47bb-0310-9956-ffa450edef68
2009-07-05 10:01:19 +00:00
David E. Jones 7e981d3cb3 Added ability to specify an entity-condition as part of a view-entity in order to encapsulate a full query definition in a view-entity
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@790472 13f79535-47bb-0310-9956-ffa450edef68
2009-07-02 06:43:50 +00:00
Adam Heath 0cd05995df Set the line number on the wrapped operation instance.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@790027 13f79535-47bb-0310-9956-ffa450edef68
2009-07-01 02:54:01 +00:00
Adam Heath bc348d0970 Don't need to wrap the containing SimpleMethod, as its operations are
will be wrapped.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@790026 13f79535-47bb-0310-9956-ffa450edef68
2009-07-01 02:41:52 +00:00
Adam Heath dd51c0108b Add a simple initCause helper method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@789400 13f79535-47bb-0310-9956-ffa450edef68
2009-06-29 18:13:19 +00:00
Adam Heath 8dea83e3af Use the new UtilXml.elementAttribute helper, to remove a bunch of
code.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@788183 13f79535-47bb-0310-9956-ffa450edef68
2009-06-24 20:59:57 +00:00
Adam Heath 783130b58d Add ability for simple methods to be wrapped with a custom compiled
class.  The resource location from where the simple method was read
is encoded as the classname of the proxy.  This makes debugging
simpler to do.  This feature is turned off by default.

The wrapping code has support for setting the line number, to include
in stack traces.  However, DOM-based xml parsing doesn't record line
numbers, so it's not possible to encode that into the wrapped proxy
class.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@783060 13f79535-47bb-0310-9956-ffa450edef68
2009-06-09 16:19:50 +00:00
Adrian Crum 1fdb04b06e Fixed bug in mini-lang <log> operation - https://issues.apache.org/jira/browse/OFBIZ-2511.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@777947 13f79535-47bb-0310-9956-ffa450edef68
2009-05-23 16:12:26 +00:00
Adrian Crum 28bc332e04 Small change to Scott's UEL improvement - convert NodeList to a java.util.List so that it can be treated like a regular List.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@770990 13f79535-47bb-0310-9956-ffa450edef68
2009-05-02 22:37:08 +00:00
Scott Gray 2b55fa55da OFBIZ-2397
Implement a custom JUEL ELResolver that handles string properties for objects implementing org.w3c.dom.Node 
and org.apache.xerces.dom.NodeImpl. It takes the String and compiles it into an XPathExpression which is 
then evaluated against the base Node. The JUEL evaluation returns either null, a single Node or a NodeList 
depending on the result of the XPath evaluation.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@770915 13f79535-47bb-0310-9956-ffa450edef68
2009-05-02 08:45:22 +00:00
Andrew Zeneski f36c5a9335 No longer requiring the boolean field 'expanded' as part of the API; after dicussing w/ Adrian; the FSE can handle pre-expanded strings
Added new API method findMatchingPermission() which takes a regular expression for the base permission returning the value of all matching permissions (see unit tests)
Fixed missing base permission in SecurityData.xml

JIRA OFBIZ-2381


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@770401 13f79535-47bb-0310-9956-ffa450edef68
2009-04-30 19:14:48 +00:00
Andrew Zeneski b3661fdd45 Integration with new Authz API - JIRA OFBIZ-2381
Note: implemented the same as widgets use of action="" uses old api, without action="" uses new api


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@769965 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 22:10:42 +00:00
Scott Gray 4acd7cc4f9 Corrected simple method documentation regarding the transaction timeout UOM, added the same to the services xsd and fixed a couple of service defs that appeared
to be specifying milliseconds rather than seconds.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@769205 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 23:53:40 +00:00
Adrian Crum 6e85ea167b Added "NewList" and "NewMap" options to the <set> element type attribute. Now screen widgets and mini-language support the creation of empty Lists and Maps.
Usage:

<set field="theList" type="NewList"/>
<set field="theMap" type="NewMap"/>



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@765284 13f79535-47bb-0310-9956-ffa450edef68
2009-04-15 17:44:47 +00:00
Jacques Le Roux b271a279a0 Fix bug introduced with
if( => if (
while( => while (


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763199 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 12:01:06 +00:00
Jacques Le Roux b9c3ddef08 2d part and end of an effort to remove trailing spaces
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)

Of course this effort to remove trailing spaces has no functional implications.

Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {

So these changes are also in this commit, should not be a problem anyway.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 10:54:51 +00:00
Adam Heath 57f96dac3b Fix lines that *only* have whitespace.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@759238 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 16:57:48 +00:00
Adam Heath f8f895bc32 Fix purely empty whitespace lines, and remove trailing whitespace.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@757074 13f79535-47bb-0310-9956-ffa450edef68
2009-03-21 23:24:13 +00:00
David E. Jones c55d1d2fc2 Changed to support loading with component://, based on patch from Ashish in OFBIZ-2244
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@755618 13f79535-47bb-0310-9956-ffa450edef68
2009-03-18 15:36:54 +00:00
Jacques Le Roux 13a934f823 In spirit of Adam's r749341 and following http://java.sun.com/docs/codeconv/html/CodeConventions.doc7.html#489
The idea is also that a lot of code is duplicated and then changed (copy/paste). Hence having a rightly formatted code help to keep it rightly formatted
1st (simple) step : ){ => ) { (I checked all occurrences but of course other pairs of eyeballs are welcome)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@750993 13f79535-47bb-0310-9956-ffa450edef68
2009-03-06 17:31:13 +00:00
Jacques Le Roux 6892c51d50 This file has not been updated during the Simple Method Cleanup Effort. See https://issues.apache.org/jira/browse/OFBIZ-2213
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@748971 13f79535-47bb-0310-9956-ffa450edef68
2009-03-01 07:58:04 +00:00
Jacques Le Roux 8a8b5eaada This fix a problem reported on user ML and close (https://issues.apache.org/jira/browse/OFBIZ-2171) "success messages are not displaying properly." - OFBIZ-2171
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@742668 13f79535-47bb-0310-9956-ffa450edef68
2009-02-09 18:32:58 +00:00
Jacques Le Roux 7a259f221f Fixes done automatically by the Label Manager. I changed the wrong ones by hand, see https://issues.apache.org/jira/browse/OFBIZ-2070 - OFBIZ-2070
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@737585 13f79535-47bb-0310-9956-ffa450edef68
2009-01-25 21:41:15 +00:00
David E. Jones ebc039406c Chanded a few more attribute names for consistency, based on feedback from Marco
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@737194 13f79535-47bb-0310-9956-ffa450edef68
2009-01-23 21:30:17 +00:00
Jacques Le Roux 572b7683e0 All tabs to 4 spaces in *.groovy, *.java, *.xml : less problems in future with that aspect...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@737003 13f79535-47bb-0310-9956-ffa450edef68
2009-01-23 11:08:47 +00:00
Jacques Le Roux b680c6cd4a Some French labels fixes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@735829 13f79535-47bb-0310-9956-ffa450edef68
2009-01-19 21:25:25 +00:00