Commit Graph
7653 Commits
Author SHA1 Message Date
Adrian Crum e4ba71404a Fixed a bug in Mini-Language where a NPE could be thrown while using Verbose logging: https://issues.apache.org/jira/browse/OFBIZ-5689.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1612205 13f79535-47bb-0310-9956-ffa450edef68
2014-07-21 07:50:08 +00:00
Jacopo Cappellato 5455dc53d4 Fixed bug I introduced in rev. 1610918: thanks to Deepak Dixit for the bug report and resolution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1612190 13f79535-47bb-0310-9956-ffa450edef68
2014-07-21 05:56:45 +00:00
Jacques Le Roux fb62866eee Removes an useless @SuppressWarnings("deprecation")
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1612022 13f79535-47bb-0310-9956-ffa450edef68
2014-07-20 06:13:38 +00:00
Jacques Le Roux 77f16816da Check properties values
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1611311 13f79535-47bb-0310-9956-ffa450edef68
2014-07-17 10:09:35 +00:00
Jacques Le Roux f302a9a297 Format a bit more BJ's code
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1611246 13f79535-47bb-0310-9956-ffa450edef68
2014-07-17 04:51:37 +00:00
Jacques Le Roux 406f8ea616 No functional change: forgot to save this formatting just before committing r1611002
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1611200 13f79535-47bb-0310-9956-ffa450edef68
2014-07-16 21:38:48 +00:00
Jacques Le Roux 149ba3a471 An updated ands slightly modified patch from BJ Freeman for "allow assignment of port for the Javamail container." https://issues.apache.org/jira/browse/1967
currently no property for setting the port to read email from in the javamail container.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1611002 13f79535-47bb-0310-9956-ffa450edef68
2014-07-16 13:29:19 +00:00
Jacopo Cappellato c1e1671ab1 Add missing import from my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1610925 13f79535-47bb-0310-9956-ffa450edef68
2014-07-16 07:57:01 +00:00
Jacopo Cappellato 3b4e2b7ec5 Fixed miscellaneous errors spotted while reviewing the logs generated by the ArtifactInfo tool.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1610918 13f79535-47bb-0310-9956-ffa450edef68
2014-07-16 07:16:15 +00:00
Jacques Le Roux ac2c4a2955 XML escape changed (at least) CommonFollowingErrorsOccurred messages (seen in French). Those are safe to not be escaped
Also indentation of the escape

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1610425 13f79535-47bb-0310-9956-ffa450edef68
2014-07-14 15:12:13 +00:00
Jacopo Cappellato 85f8da63bb Removed useless, old and incomplete code: OFBIZ-4740 Un-necessary Drop Down in Web Tools Service Reference page
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1610420 13f79535-47bb-0310-9956-ffa450edef68
2014-07-14 14:51:52 +00:00
Jacopo Cappellato e439b5b6a6 This is a slightly modified version of the work contributed by Simone Viani in OFBIZ-5619: when a service model was cloned (e.g. when runSync/call-service are invoked passing the require-new-transaction flag) the service was executed with use-transaction set to true, even if the called service is defined to not use it. Also added some checks to make sure that if require-new-transaction is true then also use-transaction must be true.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1609155 13f79535-47bb-0310-9956-ffa450edef68
2014-07-09 13:56:39 +00:00
Jacopo Cappellato e2a23a25a8 Removed from "parseEntityXmlFile" the useless require-new-transaction="true" because in this service definition we have use-transaction="false"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1609149 13f79535-47bb-0310-9956-ffa450edef68
2014-07-09 13:51:04 +00:00
Jacopo Cappellato ef5976a228 Fixed Tomcat internal logging that was broken after the upgrade to the 7 series; log4j configuration for Tomcat is now inline with the one described in http://tomcat.apache.org/tomcat-7.0-doc/logging.html
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1609047 13f79535-47bb-0310-9956-ffa450edef68
2014-07-09 07:53:23 +00:00
Jacopo Cappellato b7df4ce3ef Escaped for html all the messages (including error messages).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1608698 13f79535-47bb-0310-9956-ffa450edef68
2014-07-08 09:16:25 +00:00
Jacopo Cappellato 30736047df Removed useless logInfo statement that was causing the user password to be stored in the log files. Thanks to Grégory Draperi for the report.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1608355 13f79535-47bb-0310-9956-ffa450edef68
2014-07-07 07:42:15 +00:00
Jacques Le Roux 8802023ece Fix a small bug where delegator was missing in a Groovy script
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1606660 13f79535-47bb-0310-9956-ffa450edef68
2014-06-30 09:59:06 +00:00
Jacopo Cappellato 3cfa3cff3e OFBIZ-5651: fixed broken settings for the appserver execution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605977 13f79535-47bb-0310-9956-ffa450edef68
2014-06-27 07:37:22 +00:00
Adam Heath ccb36f2238 Fix cobertura-report when source has been generated(aka, when javacc or
jjtree has been used).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605838 13f79535-47bb-0310-9956-ffa450edef68
2014-06-26 16:15:15 +00:00
Adam Heath e04a063f21 Fix line-ending differences between windows and unix in UtilIO parsing.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605837 13f79535-47bb-0310-9956-ffa450edef68
2014-06-26 16:15:09 +00:00
Adrian Crum 714050ef33 Updated build files to use/require Java 7.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605524 13f79535-47bb-0310-9956-ffa450edef68
2014-06-25 17:59:46 +00:00
Vikas Mayur c14fc9c7ec Fix: When redirectAddress is specified and mail notification is disabled 'subject' can grow longer than the specified char limit in db and the service updateCommEventAfterEmail triggered on sendMail is failing for the same reason. The issue occurred when system invoke a failed job for the service sendCommEventAsEmail.
Note: sendCommEventAsEmail service also update the status of communication event by calling an inline service setCommEventComplete if there is no error in sendMail result. The service updateCommEventAfterEmail is also triggered by an eca on sendEmail which also do the same. They both eventually callthe service updateCommunicationEvent. In this case we should option (1) not call updateCommEventAfterEmail or option (2) make changes to updateCommunicationEvent so that it check for a status valid change before updating the communciation event record or option(3) just make updateCommEventAfterEmail responsible for updating the communication event record by removing the inline code that update the communication event to complete. Option (2) seemsright to me. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605286 13f79535-47bb-0310-9956-ffa450edef68
2014-06-25 08:02:51 +00:00
Adam Heath 8ea51fb77e Fix issues with inventory creation/transfer tests, and with the entity
engine tests, when run with java1.7.  Apparently, the order of methods
returned by reflection varies between runs, so if methods have implicit
requirements on each other, you get spurious errors.

The are 3 types of fixes:

* Combine the separate testCase methods into one
* Add explict method ordering.
* Make use testCase method completely stand-alone.

The product inventory tests were combined, while the entity engine tests
were restructured to be stand-alone.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605269 13f79535-47bb-0310-9956-ffa450edef68
2014-06-25 05:27:30 +00:00
Adam Heath 83b70a5643 Fix reversion introduced in StringUtil in r1330955; string maps using
"|" were being parsed correctly.  This fixes OFBIZ-5667.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605268 13f79535-47bb-0310-9956-ffa450edef68
2014-06-25 05:27:22 +00:00
Adam Heath 455edd3727 Remove sourcepathref from default-javac; in build.xml that did *not*
create a src-dir patternset, the default *empty* src-dir pattern set was
used.  Then, when javac would compile src/**/*.jar, it would *also*
compile any *other* java files it happened to find in the folder.

In other words, if there was an unpacked tree, let's say named 'p', and
there was a set of folders in there that eventually had java files, they
would all get compiled.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605223 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 23:21:05 +00:00
Adam Heath 6690816b01 Fix detection of cobertura, for compilation of the hook used by the
runtime container; also fixes the classpath used to define the ant
task.  Now, command-line api tests run underneath cobertura work.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605216 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 23:07:39 +00:00
Adam Heath c44853b234 Remove the empty dir, which then re-broke compilation of testtools.
This reverts all of the recent built-system breakage.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605213 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 22:51:31 +00:00
Adam Heath da7504cc2e Revert "Move ant out of the primary classpath; the shell script and batch file"
This reverts commit 24d7bda48e9618691b28cf63ef02354e1c2df2c8.

Conflicts:

	LICENSE

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605179 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 20:30:39 +00:00
Adrian Crum b934663b22 Fix broken build.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605160 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 19:16:18 +00:00
Adam Heath 55a4cc3023 Remove ant-nodeps, it's no longer part of 1.9.0 apparently.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605121 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 16:01:29 +00:00
Adam Heath 702ac6d2f8 Move ant out of the primary classpath; the shell script and batch file
now load it from this out-of-band location.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605119 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 16:01:13 +00:00
Jacopo Cappellato 05073f29df Upgrade to the most recent version of Freemarker-2.3-gae: this is not an official release yet but it will be soon; I have committed this work, as discussed in the dev list, in order to get help from the community to test this new improved version of Freemarker and provide feedback to the Freemarker community.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605029 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 08:33:04 +00:00
Adam Heath 1596c224f4 Re-enable hiding of condition parameters in toString calls; this was
accidentally checked in as part of r1604972.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604985 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:45:28 +00:00
Adam Heath c423838342 Remove encryptConditionFields from the condition objects; now, the
encryption/decryption happens at the jdbc layer, when values are set
into a PreparedStatement, or fetched from a ResultSet.

This means that conditions are no longer munged to contain the encrypted
value, and entities are no longer updated to temporarily contain the
encrypted value.  In all cases, the value of a field in memory will be
unecncrypted.

This fixes the following code patterns:

person = delegator.create("Person", [partyId: "my-party"]);
person.socialSecurityNumber = "1234";
person.store();
// this fails, the encrypted value is stored inside entity
assertEquals("1234", person.socialSecurityNumber);
currentValue = person.socialSecurityNumber
person.store();
// this fails, the field is doubly-encrypted
assertEquals(currentValue, person.socialSecurityNumber);

origCondition = EntityCondition.makeCondition(
    "socialSecurityNumber",
    EntityOperator.EQUALS,
    "1234"
);
list = delegator.findList("Person", origCondition);
newCondition = EntityCondition.makeCondition(
    "socialSecurityNumber",
    EntityOperator.EQUALS,
    "1234"
);
// this fails, because the condition is updated in-place, with the
// encrypted field value.
assertEquals(origCondition, newCondition);

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604976 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:24:22 +00:00
Adam Heath eeb2cc31f3 Condition objects are now immutable. This removed more uses of
javolution classes, namely, all the factory support code is now gone.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604975 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:24:08 +00:00
Adam Heath e226c3310b Restructured so that the built-up object is a wrapper around the actual
condition; this allows the wrapped value to be changed, as the builder
api is used, and will make it possible for the actual condition object
to be made final.

To allow for this wrapper to be passed to the delegator, it extends
EntityCondition, and delegates all calls to the contained condition
object.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604974 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:24:01 +00:00
Adam Heath fb157fd4c7 encryptConditionFields now returns a new EntityCondition, if it did
anything.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604973 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:54 +00:00
Adam Heath 40a06ca876 Add EntityConditionValue.encryptConditionFields support to
EntityConditionValue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604972 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:46 +00:00
Adam Heath b6662d97b3 In EntityExpr.encryptConditionFields. pass the call down to the lhs and
rhs when we are in join mode.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604971 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:38 +00:00
Adam Heath 9d5779c95b This is the first phase at making EntityCondition objects immutable; the
classes/fields not yet finalized are left undone due to there being
side-effects with other parts of the code base.  These side-effects will
be fixed shortly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604969 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:32 +00:00
Adam Heath 5bc5c4151f Change encrypt=true fields to no longer have a pre-pended salt value.
This is done by just setting the length of salt bytes to 0, but still
having a length byte prepended.

Add a feature to allow for certain fields to actually have a salt
prefix.  This is enabled by setting encrypt=salt in the entity
definition.

This change is slightly incompatible with existing code.  Old database
values will continue to be decrypted correctly.  However, newly
encrypted values will no longer have a salt prepended, while originally
they would.  This shouldn't be a problem in practice.

This change, along with the previous commit, finally allow for direct
lookup of encrypted values.  However, already stored values will not be
found.  To fix those, each database row will have to be read in by
ofbiz, then immediately written back out.

This is part two to completely fix OFBIZ-5959:
Person.socialSecurityNumber can't be used for findByAnd.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604968 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:23 +00:00
Adam Heath 91b11ac4f8 Fix EntityExpr encryptConditionFields; in normal use, lhs would never be
a String, because it would end up being wrapped in an EntityFieldValue
object.  The only way it would be a String is during incorrect
Freemarker lookups(which no longer happen, as the
EntityCondition.makeCondition factory pattern is now in use).

With this fix in place, EntityExpr can finally start encrypting it's
field values, so that direct matching on encrypted fields can work.

This is part one to fix OFBIZ-5959: Person.socialSecurityNumber can't be
used for findByAnd.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604967 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:11 +00:00
Adam Heath 0aaad002d6 Start creating test cases for the entity engine crypto feature.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604966 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:04 +00:00
Jacques Le Roux d296ca03ca A patch from Pierre Smits for "field type emailType is missing in entity EmailTemplateSetting" https://issues.apache.org/jira/browse/OFBIZ-5660
The field email type is missing. Thus it is not possible to categorize and filter emailsettingtemplates data.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604370 13f79535-47bb-0310-9956-ffa450edef68
2014-06-21 13:36:49 +00:00
Jacques Le Roux 5a981e746a A patch from Leon for "No lock can be acquired after ofbiz application crashes." https://issues.apache.org/jira/browse/OFBIZ-5626
We have a service which semaphore set to "fail". Someday, while it was running, the whole ofbiz crashed. 
After the restart, the service is unable to run anymore since the lock file (database record in ServiceSemaphore entity) is already there.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604363 13f79535-47bb-0310-9956-ffa450edef68
2014-06-21 13:27:20 +00:00
Adam Heath cf7cfdc544 Remove the last uses of FastList from the entity engine.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604038 13f79535-47bb-0310-9956-ffa450edef68
2014-06-19 21:38:48 +00:00
Jacques Le Roux f23f0041a0 Changes a bunch of Thru to Through (kept all truDate in a sole word to avoid ambiguities)
Note tough that thru is even in the Collins http://dictionary.reference.com/browse/thru

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1599110 13f79535-47bb-0310-9956-ffa450edef68
2014-06-02 08:02:15 +00:00
Jacques Le Roux b243ccc478 A modified patch from Ankit Jain for "We should check that the thru date is not same or older than the from date" https://issues.apache.org/jira/browse/OFBIZ-3161
jleroux: 
I reused Ankit's patch as a basis for this commit
I added an i18n label
Added a way to use alert() in showErrorAlertLoadUiLabel for generalising when no contentarea is present
Replaced $ call by jQuery
Used the <<name*='fromDate'>> and <<name*='thruDate'>> filters to get all cases (228 thruDate cases)
Still used only an alert, so it's only a warning, nothing coercive

There are other date couples like (estimatedStartDate, estimatedCompletionDate) and (actualStartDate, actualCompletionDate) but their values should not be enforced.
If ever someone wants to not let them free, then she just has to add the couples in FromThruDateCheck.js





git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1598977 13f79535-47bb-0310-9956-ffa450edef68
2014-06-01 12:34:24 +00:00
Jacques Le Roux 0f31bcb2a0 Adds a new self signed SSL certificate created on the OFBiz demo VM with own CA following http://httpd.apache.org/docs/current/ssl/ssl_faq.html#realcert
This certificate is valid for 10 years (until May 27 08:43:19 2024 GMT)
Characteristics: C=US, ST=DE, L=Wilmington, O=Apache Software Fundation, OU=Apache OFBiz, CN=ofbiz-vm.apache.org/emailAddress=dev@ofbiz.apache.org
The password is still the same: changeit, I checked: HTTPS works locally

I don't really understand the content and the need of framework/base/cert/ so I only added framework/base/cert/demoCA/newcerts/03.pem and framework/base/cert/README which explains this change


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1598544 13f79535-47bb-0310-9956-ffa450edef68
2014-05-30 10:46:54 +00:00
Jacques Le Roux e3a6768d56 Reverts r1598505, I will also update the files under framework\base\cert to backport all in one shoot
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1598507 13f79535-47bb-0310-9956-ffa450edef68
2014-05-30 09:04:38 +00:00