Commit Graph
27737 Commits
Author SHA1 Message Date
Nicolas Malin e3a7d54ba5 Fixed: No functional change, after the issue OFBIZ-9550, clean (second pass) marketing-entitymodel.xml file to realign correctly the file format (only withspaces changed on this commit)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805965 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 21:39:24 +00:00
Nicolas Malin 8b61064808 Fixed: No functional change, after the issue OFBIZ-9550, clean marketing-entitymodel.xml file with remove all field empty body xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805962 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 21:29:38 +00:00
Nicolas Malin e1aa36e229 Improved: Manage life span of marketing related entites (OFBIZ-9550)
Add life span attributes (fromDate, thruDate) on entities :
1) MarketingCampaignPrice
2) MarketingCampaignPromo
3) MarketingCampaignRole
Complete related CRUD service with align service name on the best pratice for consistency.
The previous service name has been set as deprecated :
* addPromoToMarketingCampaign replace by createMarketingCampaignPromo
* removePromoFromMarketingCampaign replace by deleteMarketingCampaignPromo
* addPriceRuleToMarketingCampaign replace by createMarketingCampaignPrice
* removePriceRuleFromMarketingCampaign replace by deleteMarketingCampaignPrice
These service has been deprecated with release information Upcoming Release to align with Jira ofbiz version
Thanks to Suraj Khurana to suggest this improvement.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805961 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 21:23:16 +00:00
Nicolas Malin deebac1bb1 Fixed: Consistency and Readability improvements for make-value tag (OFBIZ-8986)
Consistency on the attribute order for make-value element as : entity-name, value-field
Thanks to Ankush Upadhyay and Devanshu Vyas for the issue and the corrective patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805956 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 20:44:44 +00:00
Taher A. Alkhateeb 3806cad490 Refactor OFBiz containers and remove StartupCommandToArgsAdapter
(OFBIZ-9441)

A major refactoring patch that applies the following changes:

- Fully refactor the EntityDataLoadContainer
- Fully refactor the TestRunContainer
- In both above mentioned containers the logic is broken up into smaller
  methods to enhance code readability. It also changes the signature of
  the method calls to rely on StartupCommand instead of String[] arrays
- Remove most old documentation and commented out code where applicable
- Delete the StratupCommandToArgsAdapter as it is no longer needed
- Create a new feature in which OFBiz by default fails if any data file
  fails to load. This can be overridden by passing a flag called
  "continue-on-failure" e.g. ./gradlew "ofbiz --load-data continue-on-failure"
- Add a new property to --test called "loglevel" (old code but working properly)
- Add many new properties to the --load-data command including repair-columns,
  try-inserts, maintain-txs, etc ... These properties are old, but somehow
  did not make it into the command line arguments. This code is now exposed
  through the command line to set a direction in the future of whether to
  keep or delete these extra commands
- Update the documentation output of ./gradlew "ofbiz --help" to incorporate
  the new mentioned properties
- Refactor README.md to incorporate the changes to the gradle commands for both
  "-load-data" and "-test" properties. Also remove the gradle GUI
  documentation as it is now deprecated.
- Also refactor README.md in other locations to cleanup and make it more
  consistent. This icludes moving long notes into new sections and reducing
  the verbosity of the security header. Furthermore, created a new header
  called Miscellaneous documentation to house the newly created sections
- lots of small changes to remove EOL white space

Thanks: Jacques Le Roux for reviewing and testing


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805947 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 18:56:15 +00:00
Jacques Le Roux 7f350f3ff5 No functional change
Fixes typos reported by Renuka Srishti on dev ML


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805936 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 16:27:58 +00:00
Nicolas Malin 2e9a000287 Fixed: Consistency and Readability improvements for view-map tag (OFBIZ-9110)
Consistency on the attribute order for view-map element as : name, type, page
Thanks to Ankush Upadhyay and Devanshu Vyas for the issue and the corrective patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805892 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 12:18:09 +00:00
Nicolas Malin 5d73d58f8b Implemented: Add uel function to resolve a label (OFBIZ-9617)
Instead call a label from FlexibalStringExpander syntax $
{groovy: org.apache.ofbiz.base.UtilProperty.getMessage(myRessource, myLabel, locale)}

, this issue propose to implemented an uel function like : $
{util:label(myRessource, myLabel, locale)} 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805888 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 11:58:42 +00:00
Deepak Dixit eaef78840d Fixed typo, get locale from context properly, It was introduced long time back at r#1056812
Thanks Renuka Srishti for reporting this.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805880 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 11:17:23 +00:00
Jacques Le Roux c5e9931cfa Improved: Use auto-attributes in ProductFeatureCategory CRUD services
(OFBIZ-9608)

ProductFeatureCategory CRUD services have explicitly mentioned IN/OUT parameters
 in their service definition, like
<attribute name="description" type="string" mode="IN" optional="false"/>

Rather, the IN/OUT parameters for this crud services should have been written 
using auto-attribute, like
<auto-attributes include="nonpk" mode="IN" optional="true"/>

Thanks: Rohit Rai

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805867 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 08:26:52 +00:00
Jacques Le Roux b4bfcee1b9 Fixes a typo reported by Renuka Srishti on dev ML
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805775 13f79535-47bb-0310-9956-ffa450edef68
2017-08-22 15:04:24 +00:00
Deepak Dixit 0cdc258281 Removed duplicated request/view mapping
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805755 13f79535-47bb-0310-9956-ffa450edef68
2017-08-22 11:52:02 +00:00
Deepak Dixit cd65d7ac33 Move config data related to PaymentGateway configuration from seed-initial to demo (OFBIZ-9595)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805750 13f79535-47bb-0310-9956-ffa450edef68
2017-08-22 10:28:47 +00:00
Deepak Dixit e6038b7310 Removed unused variable previousRequestAttrMap from RequestHandler.java, as its not used since long.It was added at r#741374
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805739 13f79535-47bb-0310-9956-ffa450edef68
2017-08-22 09:16:57 +00:00
Jacques Le Roux 45855c4d6c Fixed: Ecommerce login/logout don't work properly for trunk and stable
(OFBIZ-9240)

ecomseo trunk and stable (R16)

    Get to https://demo-trunk.ofbiz.apache.org/ecomseo/ 
        or https://demo-stable.ofbiz.apache.org/ecomseo/
    login => main page logged in
    logout => main page, not logged in
    login => main page logged in
    Use the "Not you" link => 404
    Refresh (F5 key) get you to the main page, not logged in

So it works almost correctly but you need a refresh (F5 key) for the "Not you" 
link, not sure why yet. 
It"s the same locally with OFBIZ-9206 fixed*, w/ or w/o portoffset ecommerce 
trunk and stable (R16)

    Get to https://ofbiz-vm2.apache.org:8443/ecommerce 
        or https://ofbiz-vm2.apache.org:18443/ecommerce
    login => blank page (no 404 in access log)
    Refresh (F5 key) get you to the main page, logged in
    logout => blank page (no 404 in access log)
    Refresh (F5 key) get you to the main page, not logged in
    login => blank page (no 404 in access log)
    Refresh (F5 key) get you to the main page, logged in
    use the "Not you" link => blank page (no 404 in access log)
    Refresh (F5 key) get you to the main page, not logged in

So it works almost correctly but you need a refresh (F5 key) between in the 
3 cases, not sure why yet. 
It's the same locally with OFBIZ-9206 fixed, w/ or w/o portoffset

Rohit:
The sequencing order of ControlFilter and ContextFilter is causing this problem.
I tried to swap the order in case ecommerce but changing the sequence will not 
work because other filters(like ContentUrlFilter, CatalogUrlFilter) depends on 
the context prepared by ContextFilter.

The issue is like when we are doing chaining of request using request-redirect 
than one request attribute(FORWARDED_FROM_SERVLET) set to TRUE from 
ControlServlet. In case of ecommerce ContextFilter run before ControlFilter 
which copies all the attribute from parent request to redirect request and 
when execution reaches the ControlFilter for the redirect request than request 
will fail to hit the servlet due to the code present 
at line 126(ControlFilter.java).

To fix this problem I removed the code which copies all the attribute from 
parent request to redirect request because this thing is already taken care in 
the RequestHandler.

Thanks: Rohit and Jacopo for the analysis and the fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805677 13f79535-47bb-0310-9956-ffa450edef68
2017-08-21 20:46:28 +00:00
Jacques Le Roux 33d7198d0a Fixed: LabelManager doesn't search labels in .groovy files
(OFBIZ-8153)

The logic written needs more use cases to be covered for groovy files, existing 
findUiLabelMapInFile is not fit for groovy files.

Following patterns are currently used in groovy files:
1. uiLabelMap.xxxxx
2. uiLabelMap.get("xxxxx")

Thanks: Suraj Khurana

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805558 13f79535-47bb-0310-9956-ffa450edef68
2017-08-20 14:14:26 +00:00
Jacques Le Roux 2f66c248e6 No functional change,
In 3 places we use uiLabelMap.get("xxxxx") instead of uiLabelMap.xxxxx which 
does essentially the same when there is no default parameter passed to get()
http://mrhaki.blogspot.fr/2009/11/groovy-goodness-get-value-from-map-or.html

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805548 13f79535-47bb-0310-9956-ffa450edef68
2017-08-20 12:11:39 +00:00
Michael Brohl 7f9e0ebf75 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.base.component.
(OFBIZ-9560)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805472 13f79535-47bb-0310-9956-ffa450edef68
2017-08-18 20:52:19 +00:00
Michael Brohl a2a7235704 Improved: Fixing defects reported by FindBugs, packages
org.apache.ofbiz.accounting.period and 
org.apache.ofbiz.accounting.tax.
(OFBIZ-9527)

Thanks Kyra Pritzel-Hentley for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805466 13f79535-47bb-0310-9956-ffa450edef68
2017-08-18 20:18:58 +00:00
Michael Brohl b0f00304a0 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.accounting.ledger.
(OFBIZ-9505)

Additionally to the provided patch I removed the static ZERO variable 
and changed the assignment to BigDecimal.ZERO instead. An unused import
statement was removed also.

Thanks Kyra Pritzel-Hentley for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805464 13f79535-47bb-0310-9956-ffa450edef68
2017-08-18 19:51:39 +00:00
Michael Brohl 8d73fdc232 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.accounting.finaccount
(OFBIZ-9504)

FinAccountPaymentServices.finAccountPreAuth(DispatchContext, Map)
A value is checked here to see whether it is null, but this value can't 
be null because it was previously dereferenced and if it were null a 
null pointer exception would have occurred at the earlier dereference. 
Essentially, this code and the previous dereference disagree as to 
whether this value is allowed to be null. 
Either the check is redundant or the previous dereference is erroneous.

Thanks Kyra Pritzel-Hentley for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805463 13f79535-47bb-0310-9956-ffa450edef68
2017-08-18 19:39:26 +00:00
Michael Brohl 1e51879dab Improved: Fixing defects reported by FindBugs for package
org.apache.ofbiz.accounting.thirdparty.gosoftware.
(OFBIZ-9486)

Thanks Kyra Pritzel-Hentley for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805460 13f79535-47bb-0310-9956-ffa450edef68
2017-08-18 19:28:12 +00:00
Michael Brohl 076a2f62d8 Improved: EmailServices.sendMailFromScreen improved to take multiple
attachments with appropriate type along with several email fixes.
(OFBIZ-9395)

This patch fixes a number of issues combined in a patch because of the 
code dependencies.

1. it enables to add BCC adress(es) to service 
OrderServices.sendOrderNotificationScreens to oversteer 
ProductStoreEmailSetting of BCC the same was as for CC.

2. a method UtilValidate.isEmailList(String) is added to check a 
comma separated list of email addresses, used for example to check the 
String passed to the new BCC field for an Order-Notification.

3. there are improvements in EmailServices.sendMailFromScreen. The 
attachment type of MailAttachments is now not only .pdf but depends on 
the specific file. This has not been the case before - the mime type was
always hard coded as .pdf. The same goes for the bodyPart content-type 
which is now set to the passed content type or the default text/html 
type. Before this was also always set to text/html. 
Additionally, an attachment that has the mime-type text/plain is not 
rendered with the fop-renderer anymore but with a simple text-renderer. 
Therefore it is possible to send an CSV file as attachment now.

The patch also refactors some catch-Blocks in the 
EmailServices.sendMailFromScreen by using multi-catch since the e
xception handling is always the same.

Thanks Martin Becker for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805459 13f79535-47bb-0310-9956-ffa450edef68
2017-08-18 19:10:41 +00:00
Jacques Le Roux 658fc8ce10 No functional change
Fixes a missing English label

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805424 13f79535-47bb-0310-9956-ffa450edef68
2017-08-18 13:27:02 +00:00
Jacques Le Roux eb75c874e4 Improved: Client side validation is missing in quick create accounting
transaction process
(OFBIZ-9583)

Thanks: Thanks: Suraj Khurana for the patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805290 13f79535-47bb-0310-9956-ffa450edef68
2017-08-17 14:09:30 +00:00
Jacques Le Roux 2482af2d72 Improved: Required field indicator (*) is missing on create contact list form
(OFBIZ-9587)

Thanks: Thanks: Suraj Khurana for the patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805286 13f79535-47bb-0310-9956-ffa450edef68
2017-08-17 14:05:03 +00:00
Jacques Le Roux be52744800 Improved: Required Field Indicator (*) / Form Validation is missing on Create
New Data Source Form  
(OFBIZ-7462)

Form Validation Required Field Indicator "*" is missing on Create New Data 
Source Form . 
Marketing -> Data Source -> Create Data Source -> Data Source Id

Thanks: Suraj Khurana for the completing patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805285 13f79535-47bb-0310-9956-ffa450edef68
2017-08-17 14:02:25 +00:00
Jacques Le Roux c3f3ea6847 Improved: Enable/Disable JMS
(OFBIZ-4454)

Allows to Enable/Disable JMS with a service properties

Thanks: Adrian for report Dimitri Unruh for creating the Jira

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805158 13f79535-47bb-0310-9956-ffa450edef68
2017-08-16 09:15:00 +00:00
Jacques Le Roux d6b89bc509 Fixed: Collection added to itself
(OFBIZ-9578)

In a recent github mirror, I've found suspicious code.
Branch: master
path: framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java

...
1588         protected final List<String> messages = new LinkedList<String>();
...
1596         protected int updateData(Collection<String> messages) {
1597             if (messages != null && UtilValidate.isNotEmpty(this.messages)) {
1598                 messages.addAll(messages);
1599             }
1600             return count;
1601         }
1602     }

In Line 1598, `messages.addAll' should be `this.messages.addAll'? 
This might not be an issue but I wanted to report this just in case.

Thanks: JC (jaechang.nam@gmail.com)for report 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805143 13f79535-47bb-0310-9956-ffa450edef68
2017-08-16 07:41:31 +00:00
Jacques Le Roux 3cc575b6de Improved: Check there are no white spaces around the name of a form field when
updating a form
(OFBIZ-9306)

Sometimes ago, I lost an hour because of a space at the end of a field's name in 
a form. In creation it does not pass (the field lacks) but when updating the 
form it passes and it's hard to find from where comes the problem.

Thanks: Michael for review and spotting a possible NPE in my 1st patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805141 13f79535-47bb-0310-9956-ffa450edef68
2017-08-16 06:34:56 +00:00
Jacques Le Roux 0b235c737f No functional change
Removes redundant UserPrefGroupType data also present in common

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805140 13f79535-47bb-0310-9956-ffa450edef68
2017-08-16 06:30:58 +00:00
Jacques Le Roux 0d2b5c49a7 Improved: Required Field Indicator (*) / Form Validation is missing on Create
New Data Source Form  
(OFBIZ-7462)

Form Validation Required Field Indicator "*" is missing on Create New Data 
Source Form . 
Marketing -> Data Source -> Create Data Source -> Data Source Id

Thanks: Deepak Nigam

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805107 13f79535-47bb-0310-9956-ffa450edef68
2017-08-15 17:17:47 +00:00
Jacques Le Roux e4356bfb34 Improved: Required field indicator (*) is missing on some forms
(OFBIZ-9579)

It's missing in EditProdCatalog, this fixes it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805103 13f79535-47bb-0310-9956-ffa450edef68
2017-08-15 17:04:25 +00:00
Nicolas Malin cb175c71f7 Fixed: Missing fieldInfo when call constructor for ModelFormField Password, File and Lookup
(OFBIZ-9577)

When you create a form with an entity or service auto fields, the three previous form field call only "super(fieldSource, modelFormField);" in their constructor or this initialise a TextField with the fieldInfo FieldInfo.TEXT.
I force the field info when the super constructor is called

This missing has been found during investigation on the issue OFBIZ-9577 to improve auto-fields-service with a file upload



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805011 13f79535-47bb-0310-9956-ffa450edef68
2017-08-14 15:47:36 +00:00
Jacques Le Roux 6d55e9342b No functional changes, fixes JavaDoc issues
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804973 13f79535-47bb-0310-9956-ffa450edef68
2017-08-14 10:04:34 +00:00
Jacques Le Roux a85c94dc2f Implemented: New UtilMisc method collectionToString(...) building safely a
String with the given collection and delimiter
(OFBIZ-9397)

The added method UtilMisc.collectionToString(Collection values, String delimiter) 
creates a String from the values of a collection, separated with the given 
delimiter. This is done in a safe way without a "null" literal.

Thanks: Martin Becker

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804970 13f79535-47bb-0310-9956-ffa450edef68
2017-08-14 09:52:49 +00:00
Jacques Le Roux 514cdb1ae5 Improved: GenericServiceJob.failed(Throwable) avoid logging stacktraces for
non technical service semaphore exceptions
(OFBIZ-9400)

GenericServicejob.failed(...) logs a stacktrace on every SemaphoreWait and 
SemaphoreFail exception. The patch changes this for the non-technical service 
semaphore exceptions to a one liner error logging to avoid polluting the logfile 
with stacktraces e.g. in a scenario where a service is scheduled in short 
intervals and fails expected while the former one is still running.

jleroux: I agree the case Martin describes must be quite annoying, especially in 
production!

Thanks: Martin Becker

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804962 13f79535-47bb-0310-9956-ffa450edef68
2017-08-14 09:47:36 +00:00
Jacques Le Roux bfd533ccc3 Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571)

No functional change.

We read at http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html : 
<<Using the integer fields in this class (such as ROUND_HALF_UP) to represent 
rounding mode is largely obsolete; the enumeration values of the RoundingMode 
enum, (such as RoundingMode.HALF_UP) should be used instead.>>

That's an easy global replacement. But it also needs to import the RoundingMode 
class. It was 26 files so I decided to rather clean all the imports in all files
 with the help of Eclipse.

This is a 1st step. I will need to closely look at 2 special class: UtilNumber
and Calculate.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804953 13f79535-47bb-0310-9956-ffa450edef68
2017-08-14 08:32:21 +00:00
Jacques Le Roux a938fcfbc9 Implemented: ServiceSemaphore: Check for Transaction before suspending it in
dbWrite(...)
(OFBIZ-9401)

In ServiceSemaphore.dbWrite(...) the transaction is suspended without checking 
if there is a transaction in place. This results in logging a warning each time 
the TransactionUtil.suspend() method is invoked without a current transaction in
 place. The given patch cuts this unnecessary logging by checking if there is an
 transaction in place to suspend. If a transaction exists - suspend it.

Thanks: Martin Becker

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804940 13f79535-47bb-0310-9956-ffa450edef68
2017-08-13 19:20:14 +00:00
Jacques Le Roux 1eb540f616 No functional change.
This has been deprecated for 5+ years, time for action!

Uses digestHash() methods instead of getDigestHash(). Easily replaceable...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804880 13f79535-47bb-0310-9956-ffa450edef68
2017-08-13 07:21:01 +00:00
Michael Brohl b235295726 Improved: Replaced unnecessary local variable ZERO with BigDecimal.ZERO.
(OFBIZ-9529)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804864 13f79535-47bb-0310-9956-ffa450edef68
2017-08-12 11:52:45 +00:00
Jacques Le Roux 78ce104d7e Reverted: [FB] Package org.apache.ofbiz.accounting.payment (Additional Bugs)
(OFBIZ-9529)

GiftCertificateServices.java:229, DLS_DEAD_LOCAL_STORE
GiftCertificateServices.java:306, DLS_DEAD_LOCAL_STORE
DLS: Dead store to balance in 
GiftCertificateServices.addFundsToGiftCertificate(DispatchContext, Map)
This instruction assigns a value to a local variable, but the value is not read 
or used in any subsequent instruction. Often, this indicates an error, 
because the value computed is never used.

It was late and I was too quick yesterday night. I see no reason why we would
replace ZERO by null (no assignment) in both cases, the variables are used. 
So I revert r1804847 and I rather replace occurrences of BigDecimal.ZERO by the 
locally defined constant ZERO


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804859 13f79535-47bb-0310-9956-ffa450edef68
2017-08-12 07:59:16 +00:00
Jacques Le Roux 21244f7979 Fixed: [FB] Package org.apache.ofbiz.accounting.payment (Additional Bugs)
(OFBIZ-9529)

GiftCertificateServices.java:229, DLS_DEAD_LOCAL_STORE
GiftCertificateServices.java:306, DLS_DEAD_LOCAL_STORE
DLS: Dead store to balance in 
GiftCertificateServices.addFundsToGiftCertificate(DispatchContext, Map)
This instruction assigns a value to a local variable, but the value is not read 
or used in any subsequent instruction. Often, this indicates an error, 
because the value computed is never used.

Thanks: Kyra Pritzel-Hentley


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804847 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 19:41:32 +00:00
Jacques Le Roux 12390bfc03 Improved: Deprecated Methods in OrderChangeHelper
(OFBIZ-9570)

The methods abortOrderProcessing and releaseInitialOrderHold have been 
deprecated since the workflow engine has been replaced by the ECA. 
Both methods only return _true_ and other code code that uses these methods 
is deprecated as well.

https://svn.apache.org/viewvc?view=revision&revision=665981
The revision in OrderChangeHelper shows that the methods used to have a 
comment which stated that the methods are no longer in use.

jleroux: forgot to send the removing of some useless code


Thanks: Kyra Pritzel-Hentley for starting the analysis and creating the Jira

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804844 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 19:15:52 +00:00
Jacques Le Roux 743a9e88a0 (OFBIZ-9530)
In the method processAuthResult() line 1889 there is an empty if-statement for 
the case that authResult is null. It seems like somebody was planning to cover 
the case but forgot to add code.

I would suggest to return a service error when the authResult is null since 
otherwise it cannot be determined if the payment is authorized or not.

Thanks: Kyra Pritzel-Hentley


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804843 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 19:14:21 +00:00
Jacques Le Roux af655845be No functional change
It's convenient to add the plugins in Eclipse (project ofbiz which is actually
only ofbiz-framework) but then you need to ignore them in SVN ofbiz-framework, 
this does it.

BTW I wonder if we should not rename ofbiz to ofbiz-framework in .project !!!

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804841 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 19:09:55 +00:00
Jacques Le Roux 85fb4721f5 Improved: Deprecated Methods in OrderChangeHelper
(OFBIZ-9570)

The methods abortOrderProcessing and releaseInitialOrderHold have been 
deprecated since the workflow engine has been replaced by the ECA. 
Both methods only return _true_ and other code code that uses these methods 
is deprecated as well.

https://svn.apache.org/viewvc?view=revision&revision=665981
The revision in OrderChangeHelper shows that the methods used to have a 
comment which stated that the methods are no longer in use.

jleroux: remove the 2 methods and all useless related code


Thanks: Kyra Pritzel-Hentley for starting the analysis and creating the Jira

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804840 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 19:06:44 +00:00
Nicolas Malin 082d629aa9 Implemented: Connect OFBiz to a read only database (OFBIZ-6401)
Add a DAO helper class to use a datasource as readonly
This helper is disable by default. To enable it change the helper class on your datasource use in entityengine.xml like

    <datasource name="localderby"
            helper-class="org.ofbiz.entity.datasource.ReadOnlyHelperDAO"
            schema-name="OFBIZ" ...



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804826 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 17:09:08 +00:00
Nicolas Malin 8deead6052 Fixed: Related to the issue OFBIZ-6401Connect OFBiz to a read only database
Escape null pointer exception stack trace when the helper return no value 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804824 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 17:02:34 +00:00
Nicolas Malin 703148c27e Implemented: Manage deprecated service in the ModelService (OFBIZ-9558)
When you want to remove a service we add a new xml element <deprecated/> that you can put on the service definition like this

<service name="oldService" ...>
    <deprecated use-instead="newService" since="theReleaseXXX">The reason to move it as deprecated</deprecated>
    <implements service="newService"/>
</service>

A deprecated service generate a warning log each time it is called
When you navigate on webtools a deprecated service is strike in the service list and display deprecated reason on the service definition detail page.

Thanks to Scott, Deepak, Taher and Jacques for sharing on this subject

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804786 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 12:41:22 +00:00