Commit Graph
27737 Commits
Author SHA1 Message Date
Adrian Crum cdccca8bd1 Made ModelInfo immutable, modified ModelEntity so it contains ModelInfo instead of extending it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1478302 13f79535-47bb-0310-9956-ffa450edef68
2013-05-02 08:51:09 +00:00
Adrian Crum 2a5ccbb63b Moving toward immutable entity model classes. Also some code cleanups, simplified API, and JavaDocs.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1477929 13f79535-47bb-0310-9956-ffa450edef68
2013-05-01 08:16:56 +00:00
Adrian Crum 6943eeb11d A small overhaul for the ModelEntity class. The class is not thread-safe. Worse, there were four ModelField-related collections that were not updated consistently - causing invalid data. Two of the collections (field list and field map) were redundant, so I eliminated one.
This is a step toward thread-safety, but the class still isn't thread-safe. It would be best if this class was immutable, but that will require a lot of re-engineering.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1476826 13f79535-47bb-0310-9956-ffa450edef68
2013-04-28 20:10:02 +00:00
Adrian Crum e68964ce58 Pull up some data and methods from GenericValue to GenericEntity. GenericValue is now a GenericEntity with some convenience methods.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1476745 13f79535-47bb-0310-9956-ffa450edef68
2013-04-28 09:47:32 +00:00
Adrian Crum 94669d6bbe Some bug fixes for entity engine caches. GenericDelegator was inconsistent in clearing caches - some methods cleared the cache before the entity operation (wrong) while others cleared the cache after the entity operation (right). Also, I updated the Delegator JavaDocs to warn against skipping the cache clearing step - which shouldn't be done. Finally, the AbstractEntityConditionCache.storeHook method doesn't work (for a number of reasons) so I bypassed it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1476296 13f79535-47bb-0310-9956-ffa450edef68
2013-04-26 17:04:49 +00:00
Adrian Crum 3e3b50c688 Removed the "embedded relation cache" from GenericValue because it is a bad idea and doesn't work. There was no code to keep the embedded cache current as the GenericValue's fields changed - so the cache contents are guaranteed to be invalid (stale).
If we want to improve the performance of relation lookups, then there are better ways to do it.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1471739 13f79535-47bb-0310-9956-ffa450edef68
2013-04-24 22:21:06 +00:00
Adrian Crum 4f1b5184e6 More work on GenericEntity and GenericValue immutability.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1471687 13f79535-47bb-0310-9956-ffa450edef68
2013-04-24 21:23:12 +00:00
Adrian Crum 2fce4a0c74 GenericEntity instances coming from EntityListCache are now immutable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1471284 13f79535-47bb-0310-9956-ffa450edef68
2013-04-24 08:11:53 +00:00
Adrian Crum 9db5a99f31 Let's try this again...
Make sure an immutable GenericEntity really is immutable. Also fixed deserialization of the new Observable object.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1471283 13f79535-47bb-0310-9956-ffa450edef68
2013-04-24 08:07:36 +00:00
Adrian Crum ea766e0b2f Reverting revision 1470712. The improved immutability is causing problems in some places.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470845 13f79535-47bb-0310-9956-ffa450edef68
2013-04-23 08:23:57 +00:00
Adrian Crum c12f49f4aa Reverting revision 1470736 which was causing some tests to fail.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470827 13f79535-47bb-0310-9956-ffa450edef68
2013-04-23 06:54:17 +00:00
Adrian Crum ce645e6568 JavaDocs and some small fixups for my previous commits.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470747 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 23:00:47 +00:00
Adrian Crum 7179221b1c GenericEntity instances coming from EntityListCache are now immutable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470736 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 22:14:07 +00:00
Adrian Crum f2aa5d4d87 Removed unnecessary synchronized keyword. The GenericEntity class is not thread-safe, so synchronizing a single method is pointless.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470732 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 21:56:03 +00:00
Adrian Crum 45cec54c55 Make sure an immutable GenericEntity really is immutable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470712 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 20:46:36 +00:00
Adrian Crum bdc155f896 Copy the observable aspect of GenericEntity. Includes unit tests. Also added some FIXME comments.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470676 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 19:38:06 +00:00
Christian Geisert eb60f61759 de UI Labels in Accounting (PayPal error messages), see OFBIZ-5181
Submitted by Carsten Schinzer


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470483 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 12:49:27 +00:00
Adrian Crum 5c290a7408 Refactored GenericEntity so it contains Observable instead of extending Observable. This will enable copying the Observable aspect of the class.
Also replaced java.util.Observable with org.ofbiz.base.util.Observable. Anyone using the Observable functionality will need to change their imports.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470392 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 06:29:19 +00:00
Jacques Le Roux d75ab35079 A patch from Carsten Schinzer for "LoginServices.userLogin add info to fail message" https://issues.apache.org/jira/browse/OFBIZ-5137
The LoginServices only specify that a user was not found, but it is of interest which user was not found.
I added that to the log message in the error case.





git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470391 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 06:11:49 +00:00
Adrian Crum 73f64676df Added an Observable class and Observer interface. These will be used in an improved GenericEntity implementation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470389 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 05:37:31 +00:00
Adrian Crum 41137d0650 Oops, I missed a file in my last commit.
Moved the OperationType enum to the Delegator interface so it can be reused.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470386 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 05:02:03 +00:00
Adrian Crum 94be7afbff Moved the OperationType enum to the Delegator interface so it can be reused.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470385 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 04:52:52 +00:00
Adrian Crum 9d914eda61 Remove Javolution from GenericPK.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470383 13f79535-47bb-0310-9956-ffa450edef68
2013-04-22 03:46:30 +00:00
Adrian Crum 3ed3b1238b Added an entity cache unit test.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470274 13f79535-47bb-0310-9956-ffa450edef68
2013-04-21 09:02:13 +00:00
Jacques Le Roux 67f1143c65 Fixes "Bug in properties management." https://issues.apache.org/jira/browse/OFBIZ-5159
Yesterday, I faced a weird bug in properties management.
For a reason, a copy of a project slipped in the project itself (like if you had a copy of ofbiz root in ofbiz root).
And in this project a properties file (in a hotdeploy component) as the same name than the project (like ofbiz.properties)
Then, as properties for this file, I got all the content of the sub-dir (here would be the files in ofbiz/ofbiz) instead of the properties

This fixes it, no performance issues since properties are cached so properties file are only accessed once

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470176 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 15:29:45 +00:00
Jacques Le Roux acc88ecbd4 A patch from Nicolas Malin for "merge three maps with map-to-map" https://issues.apache.org/jira/browse/OFBIZ-5152
To merge two or more maps on one map with <map-to-map> element on mini-lang doesn't work.
example :
      <call-service service-name="accReport-header" in-map-name="headerMap">
        <result-to-field result-name="jrParameters" />
      </call-service>
      <map-to-map map="reportParameters" to-map="jrParameters"/>
      <map-to-map map="parameters" to-map="jrParameters"/>

This doesn't work because the map-to-map method doesn't accept to merge an existing to-map and the <map-to-map map="parameters" to-map="jrParameters"/> has been ignored 

The patch move the map merge function to run it when a map is given.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470151 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 10:57:34 +00:00
Jacques Le Roux ba91f07fab Fixes "Remove the relationship to PartyStatus from PartyRoleAndPartyDetail" https://issues.apache.org/jira/browse/OFBIZ-5141
Quoting Adrian in code (comment)

<!-- FIXME: This relationship does not make sense. There is no one-to-one relationship from PARTY to PARTY STATUS, so this relation will cause duplicate values for parties with multiple statuses. -->

I did not provide any paths for data migration since this is a view. Maybe some code will need to be changed in custom applications though. Should we provide a warning at https://cwiki.apache.org/confluence/display/OFBTECH/Revisions+Requiring+Data+Migration+%28upgrade+ofbiz%29 ?

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470139 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 09:57:07 +00:00
Jacques Le Roux 0aa7f8f716 A patch from Mark Schneider for "Common look for subscreens of ecommerce (minipromotext.ftl )" https://issues.apache.org/jira/browse/OFBIZ-5173
Extension of minipromotext.ftl to get more common look for this subscreen of ecommerce. Patch and screenshot will be attached.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470136 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 09:27:12 +00:00
Jacques Le Roux b0d0ea3073 Fix a minor issue "Default UserLogin screen is throwing an exception when password is incorrect and its size more then 16 chars." reported by Sumit Pandit at https://issues.apache.org/jira/browse/OFBIZ-5001
I simply changed UserLoginHistory.passwordUsed field from short-varchar to long-varchar

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470134 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 09:16:02 +00:00
Jacques Le Roux 44b77bdd07 A patch from Leon for "Some enhancement to password change." https://issues.apache.org/jira/browse/OFBIZ-5176
1. Make "password must be different from last passwords" function work. (--// FIXME: switching to salt-based hashing breaks this history lookup below)
2. When there's error occurs, return "requirePasswordChange" instead of "error". Then, "password change" form will not be redirected to "login" form if there's any kind of "error".
3. Fix one "deprecated" findByAnd call.
4. Return the "error" message instead of "event" message when password expires.
5. Chinese translation for "password expiration alert" and "password expired" message.

jleroux: I only reviewed (no tests) but seems good to me


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1470127 13f79535-47bb-0310-9956-ffa450edef68
2013-04-20 09:00:44 +00:00
Jacques Le Roux 0fe1f8f088 Removes a duplicated line, thanks to aditya who mentionned it in https://issues.apache.org/jira/browse/OFBIZ-5157
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1469710 13f79535-47bb-0310-9956-ffa450edef68
2013-04-19 06:26:08 +00:00
Paul Foxworthy 570e4c8c4a Revert r1449615, which was only a partial solution. See https://issues.apache.org/jira/browse/OFBIZ-5163 for a discussion.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1468865 13f79535-47bb-0310-9956-ffa450edef68
2013-04-17 12:26:51 +00:00
Jacques Le Roux 6ed551a5de A patch from Shi Jinghai for "Remove warning message "No converter found, converting from org.ofbiz.service.mail.MimeMessageWrapper to java.lang.String" https://issues.apache.org/jira/browse/OFBIZ-5180
When sending emails, there are warning messages in log:
2012-10-09 16:07:20,100 (default-invoker-Thread-9) [ Converters.java:102:WARN ] *** No converter found, converting from org.ofbiz.service.mail.MimeMessageWrapper to java.lang.String. Please report this message to the developer community so a suitable converter can be created. ***
2012-10-09 16:07:20,101 (default-invoker-Thread-9) [ ObjectType.java:540:WARN ] No special conversion available for org.ofbiz.service.mail.MimeMessageWrapper to String, returning object.toString().

I added a MimeMessageToString converter in MimeMessageWrapper.java to resolve this problem.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1468780 13f79535-47bb-0310-9956-ffa450edef68
2013-04-17 07:23:03 +00:00
Christian Geisert fa0080cd08 Improved/corrected German translation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1468127 13f79535-47bb-0310-9956-ffa450edef68
2013-04-15 15:45:32 +00:00
Christian Geisert 6d35eacefa Fixed wrong language label, see OFBIZ-5177
Thnaks to Atul Vani for reporting


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1467901 13f79535-47bb-0310-9956-ffa450edef68
2013-04-15 08:45:13 +00:00
Adrian Crum 2f5023231a Small optimization in GenericDelegator makeValidValue method - invoke GenericValue.setAllFields once instead of twice.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1467752 13f79535-47bb-0310-9956-ffa450edef68
2013-04-14 09:41:48 +00:00
Adrian Crum 65d38cdaf6 Removed most of Javolution from the entity engine. There are some Javolution classes I am not familiar with, so I will replace those after I do some research.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1467744 13f79535-47bb-0310-9956-ffa450edef68
2013-04-14 08:16:46 +00:00
Jacques Le Roux bd9318a005 A patch from Leon for "non-referenced lib in .classpath" https://issues.apache.org/jira/browse/OFBIZ-5175
Files "framework/base/lib/scripting/jansi-1.2.1.jar" and "framework/base/lib/scripting/jline-0.9.94.jar" have been deleted but no corresponding change to .classpath.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1466976 13f79535-47bb-0310-9956-ffa450edef68
2013-04-11 17:08:26 +00:00
Jacques Le Roux 2ba61c9514 Replace a <value xml:lang="FR">, noted by Atul on dev ML
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1466837 13f79535-47bb-0310-9956-ffa450edef68
2013-04-11 11:21:17 +00:00
Jacopo Cappellato 6075e3a884 Removed the experimental and incomplete ofbizwebsite component (intended to replace the existing OFBiz website).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1466045 13f79535-47bb-0310-9956-ffa450edef68
2013-04-09 14:17:38 +00:00
Jacopo Cappellato 17626eff28 Modified cobertura ant tasks to reuse jars already available in OFBiz rather than downloading them again.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465582 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 09:42:26 +00:00
Jacopo Cappellato 906507848a updated cobertura-report task with path to the new jar for log4j
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465578 13f79535-47bb-0310-9956-ffa450edef68
2013-04-08 09:26:49 +00:00
Adrian Crum 055f996b8e Revert some unintentional changes from my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465431 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 17:22:59 +00:00
Adrian Crum 03084330a8 Merged rev 1462755 from the 2013_RemoveJavolution branch.
Removed Javolution from Mini-language.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465427 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 17:15:10 +00:00
Jacques Le Roux d2ed43282b This was preventing the build to complete.
I wonder about jetty.properties. Should we move it to specialpurpose also?

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465362 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 11:13:21 +00:00
Jacques Le Roux 36872419e7 billhuang noticed at https://issues.apache.org/jira/browse/OFBIZ-5172 that "description is incorrect":
int org.ofbiz.base.util.UtilValidate.java file:
    public static final String isMinuteMsg = "The Hour must be a number between 0 and 59.";
    public static final String isSecondMsg = "The Hour must be a number between 0 and 59.";
should be 
    public static final String isMinuteMsg = "The Minute must be a number between 0 and 59.";
    public static final String isSecondMsg = "The Second must be a number between 0 and 59.";


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465351 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 09:35:26 +00:00
Jacques Le Roux 54ece545d9 I missed to commit security.properties with r1465185. Thanks to Leon for warning
+ French labels


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465347 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 09:08:21 +00:00
Jacopo Cappellato 6a72085f8b Updated commons logging to the latest bug fix release 1.1.2
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465345 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 08:41:21 +00:00
Jacopo Cappellato 42e11fe17d Replaced Commons Beanutils jar with the "core" (slightly lighter) version that doesn't contain Beanutils Collections classes that shouldn't be required by OFBiz.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465334 13f79535-47bb-0310-9956-ffa450edef68
2013-04-07 07:29:29 +00:00
Jacopo Cappellato 3cad56e33b Moved Jetty component from framework to specialpurpose
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465283 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 18:04:11 +00:00