Commit Graph
304 Commits
Author SHA1 Message Date
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 b2ef316f79 Added more comments about seed vs seed-initial
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@733627 13f79535-47bb-0310-9956-ffa450edef68
2009-01-12 05:19:55 +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
Hans Bakker 949345f912 adding solution for oracle problem running services
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@723336 13f79535-47bb-0310-9956-ffa450edef68
2008-12-04 14:22:44 +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 aea3931bbf Modify all <javadoc> to use the src sets, so that excluded files are
no longer processed.  Reduces javadoc warnings.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@709628 13f79535-47bb-0310-9956-ffa450edef68
2008-11-01 03:19:00 +00:00
Adam Heath 195170175b Use pattern sets in <javac/>, to include/exclude files, and modify
all build.xml to override the sets, if nescessary.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@709627 13f79535-47bb-0310-9956-ffa450edef68
2008-11-01 03:06:17 +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
David E. Jones 21effbe893 No need for a delegator example for each type of datasource
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@698432 13f79535-47bb-0310-9956-ffa450edef68
2008-09-24 05:57:15 +00:00
Jacques Le Roux 36250310e6 A patch from Philip W. Dalrymple III "Patch to add support for Postgresql with TEXT type fields" (https://issues.apache.org/jira/browse/OFBIZ-1920) OFBIZ-1920
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@697967 13f79535-47bb-0310-9956-ffa450edef68
2008-09-22 20:09:35 +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 e410552cc9 No longer *copy* the extra support files into the classes dir;
instead, just add them straight to the final jar.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685934 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 15:08:14 +00:00
Adam Heath 2617681b51 Remove svn:executable on a bunch of stuff.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@684389 13f79535-47bb-0310-9956-ffa450edef68
2008-08-10 00:53:43 +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