Commit Graph
10472 Commits
Author SHA1 Message Date
Adam Heath 5f7e967d2c OPTIMIZE: Move the fetching of the jdbc-password attribute into a single
global static method.  Soon, this logic will be changed to support
looking the password up in an external file, so that security can be
imported.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482055 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 20:04:43 +00:00
Adam Heath 7e7d53af0f FEATURE: Add getFirst/getOnly variants that take a collection.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482005 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 18:02:16 +00:00
Adam Heath 7beb84c605 FEATURE: getFirst/getOnly now use UtilValidate to verify non-emptiness.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482004 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 18:02:08 +00:00
Adam Heath dbbc11d18e FEATURE: Switch ResourceLoader.getXmlDocument() to a version of
UtilXml.readXmlDocument that records line/column information.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482003 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 18:02:01 +00:00
Adam Heath 4aaf4f720d FEATURE: When there is no configured eca handler configured, only print
out the warning once, instead of on every single call.  This actually
gives a rather impressive performance improvement.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482002 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 18:01:54 +00:00
Adam Heath 1625a1a80f FIX/FEATURE: When shutting down, make certain to close down log4j as
well.  This will ensure that any asynchronous logs have finished
writing to disk, or to the console.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1482000 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 18:01:47 +00:00
Adam Heath 523ffda8be FIX: Make commons-daemon reflection access work again; this was broken
because the constructor was private, and the init(String[]) method was
removed.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1481999 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 18:01:39 +00:00
Adam Heath 0dde029713 FORMATTING: The empty constructor body is no longer on a single line.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1481998 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 18:01:32 +00:00
Jacopo Cappellato f4fad5a6a9 Upgraded Tomcat from 7.0.39 to latest 7.0.40
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1481739 13f79535-47bb-0310-9956-ffa450edef68
2013-05-13 09:09:16 +00:00
Adrian Crum eb7dd6969a Improvements to the ModelRelation and ModelKeyMap classes. Now the entity engine can accurately detect duplicate relations.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1481518 13f79535-47bb-0310-9956-ffa450edef68
2013-05-12 10:52:55 +00:00
Adrian Crum df4f66cf6b Reverted revision 1480891 and fixed the problem it tried to fix.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1481367 13f79535-47bb-0310-9956-ffa450edef68
2013-05-11 16:12:05 +00:00
Adrian Crum d24e90b7cc Copied the fix from revision 1480407 to the rest of the screen widgets.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1481287 13f79535-47bb-0310-9956-ffa450edef68
2013-05-11 10:34:57 +00:00
Adrian Crum 6a5387a708 Fixed a problem in Web Tools that was caused by recent entity model changes. Reported by Olivier Heintz on the user mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1480702 13f79535-47bb-0310-9956-ffa450edef68
2013-05-09 15:56:46 +00:00
Adrian Crum 5639dec18e Fixed an exception in the form widget - reported by Jacques on the dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1480407 13f79535-47bb-0310-9956-ffa450edef68
2013-05-08 18:57:58 +00:00
Adrian Crum fe963375c8 Fixed a problem in Web Tools that was caused by recent entity model changes. Reported by Atul Vani on the user mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1480248 13f79535-47bb-0310-9956-ffa450edef68
2013-05-08 12:26:24 +00:00
Jacques Le Roux 0638e8fa03 A sligthly modified patch from Christoph Neuroth for "Exceptions logged when caches contain collections with unserializable objects" https://issues.apache.org/jira/browse/OFBIZ-5184
jacopoc commited revision 1352575 which would prevent stack traces to be logged when viewing the cache overview screen in /webtools. However, a stacktrace is still logged when the caches contain collections which themselves contain objects which cannot be serialized.

jleroux: I simply used logWarning instead of info

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1480079 13f79535-47bb-0310-9956-ffa450edef68
2013-05-07 21:09:47 +00:00
Jacques Le Roux dca9ace3ee A patch from Iurii Volosheniuk for "Russian translation for framework/common/config/CommonErrorUiLabels.xml, framework/common/config/CommonHelpUiLabels.xml, framework/common/config/CommonPortalEntityLabels.xml, framework/common/config/PrefErrorUiLabels.xml " https://issues.apache.org/jira/browse/OFBIZ-5187
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1479666 13f79535-47bb-0310-9956-ffa450edef68
2013-05-06 18:30:32 +00:00
Adrian Crum 06cc7b2e41 Remove Javolution from ModelViewEntity.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1478620 13f79535-47bb-0310-9956-ffa450edef68
2013-05-03 01:02:56 +00:00
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
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 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 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
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
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