Jacques Le Roux
f796e230d2
catch( => catch(
...
}else => } else
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@751005 13f79535-47bb-0310-9956-ffa450edef68
2009-03-06 17:55:43 +00:00
Jacques Le Roux
639a784790
while( => while (
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@750998 13f79535-47bb-0310-9956-ffa450edef68
2009-03-06 17:38:03 +00:00
Jacques Le Roux
fc6db9e886
if( => if (
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@750997 13f79535-47bb-0310-9956-ffa450edef68
2009-03-06 17:36:09 +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
Adam Heath
bea3dc678b
Move some entity-specific code out of base, by making use of
...
javax.imageio.spi.ServiceRegistry, and META-INF/services.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@749893 13f79535-47bb-0310-9956-ffa450edef68
2009-03-04 04:21:13 +00:00
Hans Bakker
b021dfe8f6
improve error message, corrected creation of a primamry key sequence
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@742842 13f79535-47bb-0310-9956-ffa450edef68
2009-02-10 04:06:32 +00:00
David E. Jones
ebd5c3e78f
Implemented StringModel extension and BeansWrapper extension to load it in order to encode strings for HTML use; this is only done throught the HtmlWidget class that is part of the screen widget, so won't interfere with other FTL uses; note that there is other experimental code in here for wrapping the GenericValue object for html encoding, but that option wasn't very complete so went this way instead; this option behaves better and is more transparent than that escape x as x?html option for FTL files; there are also a few cleanups of typos and things in here; note that this means we have a different Configuration object and so a different template cache, and so we have different cache settings and such; after applying this I found a few places that encoded things they shouldn't but for the most part it is pretty good; will be committing some changes in applications in a bit to resolve a couple of these issues in ecommerce; all should watch out for funny things showing up as HTML text instead of being interpreted by the browser as HTML, meaning it was encoded; in extreme cases just comment out lines 71-73 of HtmlWidget.java to turn off this encoding
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@742013 13f79535-47bb-0310-9956-ffa450edef68
2009-02-08 07:40:40 +00:00
David E. Jones
4d9382e887
Cleanup and pretty-up a bunch of log statements; moved some less helpful ones to verbose, combined some, and generally tried to make logs in various places more user friendly
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@741424 13f79535-47bb-0310-9956-ffa450edef68
2009-02-06 06:04:58 +00:00
David E. Jones
da0f617961
Small change to make use-cache easier to parameterize; since cache conflicts with the iterator, have the use-cache setting override the use-iterator setting
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@741396 13f79535-47bb-0310-9956-ffa450edef68
2009-02-06 04:18:20 +00:00
Jacopo Cappellato
900ddd63cf
Added ability to define entity-data-readers on the fly.
...
For example, if in a custom ofbiz-component.xml file you have:
<entity-resource type="data" reader-name="prod1" loader="main" location="data/ProdData1.xml"/>
you can load it running the ant task:
ant run-install-readers -Ddata-readers=prod1
even if the reader is not defined in entityengine.xml.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@739782 13f79535-47bb-0310-9956-ffa450edef68
2009-02-01 16:43:05 +00:00
Hans Bakker
741e725f95
give an error message instead of NPE when a field is not found
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@739188 13f79535-47bb-0310-9956-ffa450edef68
2009-01-30 06:02:31 +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
David E. Jones
fd152ab960
Improved GenericValue.checkFks method so that is dummy fk value is created then it will inherit the values create/update stamps so it doesn't seem like newer data; should fix issue reported by Sam Hamilton about 2-way entity sync erasing data when dummy fks are needed
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@733423 13f79535-47bb-0310-9956-ffa450edef68
2009-01-11 06:53:05 +00:00
David E. Jones
874f02e9da
Manual merge of typecheckcleanup200810 branch as of rev 731346 in that branch, resolved all conflicts; with this BigDecimal is not the native type for many entity fields and is used for many calculations; some work is still needed in certain areas of the project but this covers the most critical ones; thanks especially to Scott for his work on this
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@731851 13f79535-47bb-0310-9956-ffa450edef68
2009-01-06 07:13:36 +00:00
David E. Jones
0d32641db0
Fixed issue where the attribute value was used for two things, so where it means an entity generic value it is now value-field and an actual String or other type of value is just plain value
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@729707 13f79535-47bb-0310-9956-ffa450edef68
2008-12-28 08:40:44 +00:00
David E. Jones
65b455ac9b
The last batch of the major changes to make naming in simple-method attributes more consistent and simplify due to simpler tools; again see the Simple Method Cleanup Effort docs page for details on changes; some additional cleanups may be done based on feedback but this should be most of it
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@729704 13f79535-47bb-0310-9956-ffa450edef68
2008-12-28 08:17:47 +00:00
David E. Jones
461cde8932
These messages are logged as warnings but have the word error in them, so changing that to warning so hopefully we wont have multiple messages per week asking about it
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@727827 13f79535-47bb-0310-9956-ffa450edef68
2008-12-18 21:07:41 +00:00
Christian Geisert
48554c95b0
Fix for delegator.removeByAnd(entityName)
...
(it failed because of empty where condition)
Submitted by Marco Ruocco
See OFBIZ-1952
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@727342 13f79535-47bb-0310-9956-ffa450edef68
2008-12-17 10:52:06 +00:00
Adrian Crum
03ae66d708
Implemented FlexibleMapAccessor.getInstance() in the remaining classes. Deprecated the FlexibleMapAccessor constructor.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@726260 13f79535-47bb-0310-9956-ffa450edef68
2008-12-13 19:25:33 +00:00
Jacques Le Roux
7f2cd293c4
I forgot a Luke Prentice's remark in https://issues.apache.org/jira/browse/OFBIZ-1045?focusedCommentId=12630930#action_12630930
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@721904 13f79535-47bb-0310-9956-ffa450edef68
2008-11-30 22:12:46 +00:00
Jacques Le Roux
5a9c25deeb
A patch from Luke Prentice "EntityOperator does not correctly construct SQL for BETWEEN clause" ( https://issues.apache.org/jira/browse/OFBIZ-1045 ) - OFBIZ-1045
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@721887 13f79535-47bb-0310-9956-ffa450edef68
2008-11-30 20:16:04 +00:00
Jacques Le Roux
6882531dcd
Allow to use BETWEEN operator in widget action int he same way IN operator is used.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@721839 13f79535-47bb-0310-9956-ffa450edef68
2008-11-30 16:13:00 +00:00
Jacques Le Roux
9279e3c7d8
To allow clear separation with real ERRORs when searching in log (lowercase is enough for that)
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@713422 13f79535-47bb-0310-9956-ffa450edef68
2008-11-12 16:47:51 +00:00
Adam Heath
e928d0ba94
Rename a variable called foo to conversion.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@711757 13f79535-47bb-0310-9956-ffa450edef68
2008-11-06 02:46:21 +00:00
Adam Heath
bf5144d6a0
No more javadoc warnings.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@709634 13f79535-47bb-0310-9956-ffa450edef68
2008-11-01 03:35:29 +00:00
Adam Heath
c3dcee492a
No longer store a separate id/code combo; instead, store the
...
SQLFunction enum. This gives a very slight memory reduction,
depending on how many instantiated functions are in the system.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@708771 13f79535-47bb-0310-9956-ffa450edef68
2008-10-29 04:36:42 +00:00
Adam Heath
e8b37d65e3
Switch ID_FOO to Enum.ordinal().
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@708767 13f79535-47bb-0310-9956-ffa450edef68
2008-10-29 04:24:41 +00:00
Adam Heath
f205b3564e
Move the factory create stuff to an enum; this allows for looking
...
up functions by their string name.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@708766 13f79535-47bb-0310-9956-ffa450edef68
2008-10-29 04:16:59 +00:00
Adam Heath
ae5757b54e
Fix tabbing/spacing(minor).
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@708761 13f79535-47bb-0310-9956-ffa450edef68
2008-10-29 03:29:01 +00:00
Jacques Le Roux
c6adcaaa0e
Revert r707216 on Adam and David's advices (OFBIZ-1232)
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@707830 13f79535-47bb-0310-9956-ffa450edef68
2008-10-25 10:02:40 +00:00
Jacques Le Roux
b3a8df1ef9
Merged and modified Oscar Pablo's patch from "Data filtering in entity views" ( https://issues.apache.org/jira/browse/OFBIZ-1232 ) - OFBIZ-1232
...
I put documentation in entitymodel.xsd, removed the need for an iterator, and strengthened makeViewFilterWhereClause.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@707216 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22 22:22:00 +00:00
Jacques Le Roux
fa9e4bccb9
A patch from Michael Imhof "Entity declaration: NOT NULL Fields on database" ( https://issues.apache.org/jira/browse/OFBIZ-747 ) - OFBIZ-747
...
This is simple, clear and may turn useful in some cases. It can't hurt anything but will only work on a new data base.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@707135 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22 17:03:27 +00:00
David E. Jones
055c5d9762
Changed GenericEntity.set data type warning to be far more obnoxious as discussed in the mailing list, not in a different file or anything yet; also added a similar check to the EntityExpr class, called for now just when creating the SQL because before then we don't even know which entity it is, though it would be nice to do in the constructor this at least gets us close when there are issues
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@706842 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22 01:30:49 +00:00
David E. Jones
1f4ab8f090
Added exception to get location when the delegator name isn't passed in
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@706840 13f79535-47bb-0310-9956-ffa450edef68
2008-10-22 01:29:03 +00:00
Jacques Le Roux
4108324e0f
A patch patch from Marco Risaliti " Error parsing entity xml file: java.io.CharConversionException: Invalid UTF-8 Encoding" ( https://issues.apache.org/jira/browse/OFBIZ-1957 ) - OFBIZ-1957
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@706692 13f79535-47bb-0310-9956-ffa450edef68
2008-10-21 17:56:55 +00:00
Adam Heath
c0b67405aa
Slight change to getFieldListFromEntityList*, so that calling code
...
can automatically have it cast to the correct container type.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@697926 13f79535-47bb-0310-9956-ffa450edef68
2008-09-22 18:21:42 +00:00
Hans Bakker
a16c35484c
OFBIZ-1934: Ignore property for condition-expr tag, excellent contribution by Bruno Busco
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@689713 13f79535-47bb-0310-9956-ffa450edef68
2008-08-28 04:17:48 +00:00
David E. Jones
3a461ea757
Added visitId persistence to EntityAuditLog stuff
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@688498 13f79535-47bb-0310-9956-ffa450edef68
2008-08-24 12:09:37 +00:00
Adam Heath
839c7b6827
Stop deprecation warnings about ByteWrapper.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@688220 13f79535-47bb-0310-9956-ffa450edef68
2008-08-22 23:02:17 +00:00
Scott Gray
a3cb1fb0b6
Recommitting r687578, changed slightly to follow Adam's lead
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@688212 13f79535-47bb-0310-9956-ffa450edef68
2008-08-22 22:53:40 +00:00
Adam Heath
06b236adae
Fix breakage with IN type operations.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687936 13f79535-47bb-0310-9956-ffa450edef68
2008-08-22 04:00:57 +00:00
Scott Gray
64c7041d3f
Reverted 687578, which will at least take the problem back to a minor bug rather than a major one, sorry everyone
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687918 13f79535-47bb-0310-9956-ffa450edef68
2008-08-22 01:09:14 +00:00
Scott Gray
fd0e5ee7c0
Reverted some of the recent generics work which seems to be causing the issues reported in the user mailing lists by BJ Freeman and Sharan Foga.
...
Adam, it would be great if you could take another look at this
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687578 13f79535-47bb-0310-9956-ffa450edef68
2008-08-21 06:31:02 +00:00
Adrian Crum
ead3169d5c
FlexibleStringExpander refactor.
...
1. Improved parsing logic - the entire expression is pre-parsed now.
2. Factory method stores parsed expressions in the cache.
3. Single null/empty expression instance - saves on memory.
4. Class names and variable names shortened to reduce object size.
5. Small performance improvements.
The expression cache is set up with no limit. We'll have to see if that needs to be changed. Larger installations might need to limit the expression cache size.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@687422 13f79535-47bb-0310-9956-ffa450edef68
2008-08-20 18:50:04 +00:00
Jacques Le Roux
e7905f2c8c
Fix the anti-pattern
...
if (* != null && *.size() > 0) {
where * is a variable name (String or Collection). Rewritten to
if (UtilValidate.isNotEmpty(*)) {
Done with Eclipse regex replace feature with
search = if \((\w+) *!= *null *&& *(\w+)\.size\(\) *> *0\) *\{
replace = if (UtilValidate.isNotEmpty($1)) {
And of course some hand-work for imports and cleaning. I compiled and tested with ant run-tests
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@686591 13f79535-47bb-0310-9956-ffa450edef68
2008-08-17 07:47:18 +00:00
Adam Heath
2527b104a9
More FlexibleMapAccessor fallout.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682103 13f79535-47bb-0310-9956-ffa450edef68
2008-08-03 05:17:15 +00:00
Adam Heath
049ffce626
Continuing with generics.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@682056 13f79535-47bb-0310-9956-ffa450edef68
2008-08-02 21:38:01 +00:00
Jacopo Cappellato
fa9f0a3253
The default-group-name is now returned by the group name methods of ModelGroupReader.
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@679331 13f79535-47bb-0310-9956-ffa450edef68
2008-07-24 09:43:27 +00:00
David E. Jones
2ccff0b5d8
An option I've resisted for a while due to limited flexibility when used, but we have a lot of these common cases so this may be worth it; can now define CrUD services and not have to implement them for common cases; the create, update, and delete ExampleItem services now use this entity-auto implementation instead of explicit simple-methods; those are tested and are working, and other variations on create should too but I haven't tested them yet; this also includes various refactorings to expose nderlying tools in simple method code and make it reusable
...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@679058 13f79535-47bb-0310-9956-ffa450edef68
2008-07-23 10:24:58 +00:00
Jacques Le Roux
641ff10050
Update Copyright to 2008
...
A real replace in files feature was one of the reasons I use Eclipse 3.4 for near a year now (I even helped to test, a real must have :o)
Not sure previous commit was sent partially or not at all (I needed to update)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@677685 13f79535-47bb-0310-9956-ffa450edef68
2008-07-17 18:56:25 +00:00