Commit Graph
8242 Commits
Author SHA1 Message Date
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
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 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
Jacopo Cappellato c04409e2eb Removed two jar files that contain classes already available in other jars:
* el-api-2.2.jar is a duplicate of juel-2.2.1.jar
* geronimo-qname_1.1_spec-1.0.jar is a duplicate of xml-apis-2.9.1.ja



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465281 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 17:47:02 +00:00
Jacopo Cappellato 27c1c384a4 Moved the appserver component from framework to specialpurpose.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465276 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 17:25:01 +00:00
Jacopo Cappellato 62d02aaea9 Removed the GroovyShellContainer, that was disabled by default for security reasons, mostly because it was based on some code distributed with unclear license terms.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465254 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 14:48:10 +00:00
Adrian Crum 8b122612cd Removed Javolution from UtilMisc.java. Also removed the SimpleMap class - which provided no benefit because it was converted to a "real Map" 99.8% of the time.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465253 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 14:44:34 +00:00
Jacopo Cappellato 012c598c2f Moved Axis1 jars to specialpurpose/birt because it is now the only component that still uses these old jars while the framework runs on Axis2.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465252 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 14:35:05 +00:00
Jacques Le Roux 1b6a4204e6 Adds again the possibility to use the previous way about detecting slow services in logs.
Now it uses properties for the 2 Thresholds
0 to get the same behaviour as Adrian's last commit
1000 to get almost the same behaviour than before Adrian's last commit. But with no distinctions with slow and very slow services and a higher level for slow services. This value makes sense for instance for web services (SOAP, RMI, REST) served by external systems.
The properties can be used to set as desired. I believe it's no confusing OOTB and still flexible enough.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465223 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 10:58:20 +00:00
Jacques Le Roux 524aee52f9 A slightly modified patch from Sumit Pandit for "Enforce user to reset his password in a pre-defined regular interval of time." https://issues.apache.org/jira/browse/OFBIZ-5009
Reference requirement for the feature: http://markmail.org/message/sihxekwk6655t5gh#query:+page:1+mid:bcw2vva2hjxhsodq+state:results

For a user account in system, we can set password age for an additional security.
Proposed system will start suggesting to user to reset his password few days before password expiration. Then Once password expired, system will enforce him to reset his password before processing further.
Following will be control points and would be part of system configuration- 
* *Control Points -*
** Admin can enable/disable the reset password functionality.
*** -It will control by a flag in propriety file where admin can enable/disable it by setting true/false.
** Number of days in which password will expired.
*** - It will defined in propriety file so that admin can control it.
** Number of days before when password expiration alert display at user's screen.
*** - It will defined in propriety file so that admin can control it.

* *How should it processed -*
** After user logged-in, display password expiration notification message to user if his password will expire in comming days.
** After user logged-in, display change password screen, when password is expired. i.e. The difference in days since last time password updated is exceed to number of days specified in system policies. Enforce user to reset his password.

* *What will be the out-put -*
** Password is about to expire : : alert message after login.
** Password is expired : Password-Expired-Alert : alert message with reset password screen.

Following is implementation plan -

    security.properties : Provide configuration for following control points :
        Enabling / Disabling of the functionality.
        Maximum number of days within user has to change the password.
        Number of days back to password expire date, when user start getting password expiration alerts.

    Data model
        Entity name : UserLoginPasswordHistory : Existing entity.

    Business logic
        Create UserLoginPasswordHistory record when a new user is created (if configured).
        Expire and then Create UserLoginPasswordHistory record when user update existing password.
        Everytime, when user login check for password expiration. If password expired then display change password screen to user. And if password not yet expired but it is close to expire display alert message to user about its expiration.

jleroux: I just changed 
from 
if (reqToChangePwdInDays != 0) {
tp
if (reqToChangePwdInDays > 0) {

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465185 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 04:54:14 +00:00
Jacques Le Roux 94990b2ce3 A patch from Iurii Volosheniuk "Russian translation for framework/common/config/CommonUiLabels.xml" https://issues.apache.org/jira/browse/OFBIZ-5171
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465125 13f79535-47bb-0310-9956-ffa450edef68
2013-04-05 20:49:46 +00:00
Jacques Le Roux ca43c6a2c4 Just adds a date-time to clarify the moment all caches were cleared
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465103 13f79535-47bb-0310-9956-ffa450edef68
2013-04-05 19:41:42 +00:00
Adrian Crum ecae60f467 Small optimization for location resolvers - don't go to the file system while building URLs. This will benefit single box (app server + DB server) installations.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1464750 13f79535-47bb-0310-9956-ffa450edef68
2013-04-04 20:57:46 +00:00
Adrian Crum 25928aba2a Small fixup for CachedClassLoader.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1464744 13f79535-47bb-0310-9956-ffa450edef68
2013-04-04 20:53:21 +00:00
Adrian Crum 01fcde7134 Some optimizations in FlexibleMapAccessor.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1464032 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 14:10:01 +00:00
Adrian Crum 48c26a3216 CachedClassLoader.java - replaced Javolution with non-blocking java.util.concurrent.* classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1464015 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 13:54:10 +00:00
Adrian Crum 2d651e0f6d Changed some information-only logging from WARN to INFO.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1464001 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 13:29:44 +00:00
Jacopo Cappellato e66239876f Small improvements to error log messages.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1463885 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 08:56:31 +00:00
Adrian Crum fa4e931206 Log message cleanup in ServiceDispatcher.java. Removed confusing text about services taking too long.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1463863 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 07:57:24 +00:00
Adrian Crum 24f64fe28b Log message cleanup in ModelReader.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1463859 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 07:55:02 +00:00
Adrian Crum 19e3b14945 Fixed bug in BaseUnitTests.java where the original debugging levels were not restored.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1463856 13f79535-47bb-0310-9956-ffa450edef68
2013-04-03 07:53:11 +00:00
Jacques Le Roux 7c323b902d A refactored patch from Leon for "Bug introduced by OFBIZ-4769, it makes <entity-one> failed if the context contains incorrect data" https://issues.apache.org/jira/browse/OFBIZ-5148
How to reproduce:
1. open "https://demo-trunk.ofbiz.apache.org/partymgr/control/editpartygroup?create_new=Y" (try to create a new party group)
2. input any words in group name field, input any "incorrect" non-digits characters (e.g. "abcd" blah blah) to field "Annual revenue"
3. click save
It leads to an "exception" page instead of original input form with error message.

I digged some codes and found it's related to r1426231 commit (of OFBIZ-4769).

jleroux: the logic of code seemed good to me, I just refactored the cod a bit (in a previous refactoring attempt I missed the point that parametersObjExists might not be present. This new code is a simplified version of what does setAllFields internally. The PK fieldValues are set before being possibly overriden by context values. There is no Map casting. I tested the previous issues, all are resolved. 



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1462948 13f79535-47bb-0310-9956-ffa450edef68
2013-03-31 13:41:34 +00:00
Adrian Crum 909bed712c Some optimization work in UtilURL.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1462942 13f79535-47bb-0310-9956-ffa450edef68
2013-03-31 13:12:20 +00:00
Jacques Le Roux 0e341837a5 Revert r1462902, there are 3 tests failing and I have not the time to look at it yet
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1462912 13f79535-47bb-0310-9956-ffa450edef68
2013-03-31 10:27:41 +00:00
Jacques Le Roux a4d71dd61e A refactored patch from Leon for "Bug introduced by OFBIZ-4769, it makes <entity-one> failed if the context contains incorrect data" https://issues.apache.org/jira/browse/OFBIZ-5148
How to reproduce:
1. open "https://demo-trunk.ofbiz.apache.org/partymgr/control/editpartygroup?create_new=Y" (try to create a new party group)
2. input any words in group name field, input any "incorrect" non-digits characters (e.g. "abcd" blah blah) to field "Annual revenue"
3. click save
It leads to an "exception" page instead of original input form with error message.

I digged some codes and found it's related to r1426231 commit (of OFBIZ-4769).

jleroux: the logic of code seemed good to me, I just refactored the cod a bit. This new code is a simplified version of what does setAllFields internally. The PK fieldValues are set before being possibly overriden by context values. There is no Map casting. I tested the previous issues, all are resolved. 



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1462902 13f79535-47bb-0310-9956-ffa450edef68
2013-03-31 09:20:30 +00:00
Ashish Vijaywargiya e5c7297a41 Adding Method to retrieve form-label from model parameter object in freemarker. Thanks Ankush for providing method for this missing functionality.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1462265 13f79535-47bb-0310-9956-ffa450edef68
2013-03-28 19:15:50 +00:00
Ashish Vijaywargiya 1ed8f39ed2 Applied bug fix from jira issue - OFBIZ-5165 - Broken renderLabel functionality of screenfop view handler.
If we use label inside widget tag then renderLabel macro skip the label rendering due to wrong condition check.
-- Corrected the conditions for label rendering.
-- Also replaced fo:inline with fo:block as fo:inline can't render directly.
Thanks Deepak.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1462257 13f79535-47bb-0310-9956-ffa450edef68
2013-03-28 18:51:26 +00:00