Commit Graph
689 Commits
Author SHA1 Message Date
Jacques Le Roux 587e656831 No functional refactoring changes while reviewing r1819730
Removes useless exceptions handling. 
Uses try-w/-ress for ByteArrayInputStream

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819764 13f79535-47bb-0310-9956-ffa450edef68
2018-01-01 12:23:18 +00:00
Jacques Le Roux 297371b526 Improved: Handle service response effectively
(OFBIZ-9981)

As per discussion on Dev ML:
==========================
Every service calling from java/groovy must handle errors by service util 
methods such as isError, returnError etc. 
and similarly in case of XML <call-service, there should be <check-error/> 
to make sure service was executed successfully.

Apart from this, one suggestion is to include *Debug.logError* in 
*ServiceUtil.returnProblem* so that in case of any error occurred and handled, 
it will always be logged on the console.
==========================

jleroux: this is the applications part with some slight changes

Thanks: Suraj Khurana and Anushi Gupta

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819730 13f79535-47bb-0310-9956-ffa450edef68
2017-12-31 11:11:46 +00:00
Michael Brohl 50c4bba4b2 Improved: Replace all "e.printStackTrace();" by calls to the Debug class.
(OFBIZ-10083)

Thanks Jacques Le Roux for reporting and Kyra Pritzel-Hentley 
for providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818921 13f79535-47bb-0310-9956-ffa450edef68
2017-12-21 12:33:04 +00:00
Michael Brohl f8d52ffb08 Improved: Logging: change System.out/.err/.. println to Debug.log...
in PdfSurveyServices.java.
(OFBIZ-10046)

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

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818848 13f79535-47bb-0310-9956-ffa450edef68
2017-12-20 20:10:15 +00:00
Michael Brohl 60b6d5a02f Fixed: Potential Nullpointer in ContentWorker.checkConditions()
(OFBIZ-10051)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818667 13f79535-47bb-0310-9956-ffa450edef68
2017-12-19 13:36:37 +00:00
Jacques Le Roux d1bdee2c6c Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

This completes the work done so far by removing double check in cases not using 
brackets, like
if (Debug.verboseOn())
  if (Debug.verboseOn()) Debug.logVerbose()

Thanks: Michael for reporting this case I missed.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818445 13f79535-47bb-0310-9956-ffa450edef68
2017-12-16 19:00:19 +00:00
Michael Brohl e162996ed6 Improved: No functional change, just corrected an indentation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818408 13f79535-47bb-0310-9956-ffa450edef68
2017-12-16 13:58:14 +00:00
Michael Brohl 55d93d472c Improved: General refactoring and code improvements, package
org.apache.ofbiz.content.data.
(OFBIZ-10077)

Thanks Julian Leichert for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818388 13f79535-47bb-0310-9956-ffa450edef68
2017-12-16 11:58:56 +00:00
Michael Brohl b054a6e68e Improved: General refactoring and code improvements, package
org.apache.ofbiz.content.output.
(OFBIZ-10078)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818387 13f79535-47bb-0310-9956-ffa450edef68
2017-12-16 11:52:32 +00:00
Michael Brohl c8053bb3ca Improved: General refactoring and code improvements, package
org.apache.ofbiz.content.survey.
(OFBIZ-10079)

Thanks Julian Leichert for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818337 13f79535-47bb-0310-9956-ffa450edef68
2017-12-15 21:02:07 +00:00
Michael Brohl 89c28c3762 Improved: General refactoring and code improvements, package
org.apache.ofbiz.content.webapp.ftl.
(OFBIZ-10080)

Thanks Julian Leichert for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818335 13f79535-47bb-0310-9956-ffa450edef68
2017-12-15 20:56:29 +00:00
Deepak Dixit b783524847 Fixed: Screen rendering error on Content Advanced Search page (OFBIZ-9365)
Thanks Aditya Sharma for reporting the issue.

Content Advanced search was broken since long, still need to review work done at r#1102554, In this commit most of the issue has been fixed.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818273 13f79535-47bb-0310-9956-ffa450edef68
2017-12-15 12:01:39 +00:00
Jacques Le Roux 4928bf3ae5 Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

This completes r1818075, there were still few cases, a last regexp search is 
never too much :)

Found 4 other loops with Strings concatenation, but who cares, it's only 
verbose logging...

There should not be anymore...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818077 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 22:37:16 +00:00
Jacques Le Roux 735f946b83 Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

This completes r1818020, there were still few cases, a last review is never too
much

In PriceServices, I spotted
  for (GenericValue orderItemPriceInfo: orderItemPriceInfos) {
      if (Debug.verboseOn()) Debug.logVerbose(" --- " + orderItemPriceInfo
but it's OK with me, this should be rarely used, so not a perf issue


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818075 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 22:24:25 +00:00
Jacques Le Roux 40e8be83df Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

This completes r1818010, there were much more cases.
Also few tabs automatically replaced by spaces

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818020 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 14:11:38 +00:00
Jacques Le Roux e0d2057456 Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

We discussed on this point: http://markmail.org/message/mplvusuqn7oshl4v 
and we agreed about better doing a check when using Debug.logVerbose().

I checked there are 300+ cases like that. Since it's an easy S/R 
This implements it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818005 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:43:05 +00:00
Deepak Dixit 7e19de9966 Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818003 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:03:17 +00:00
Deepak Dixit 63258e90f8 Reverted r#1817989, workign fine locally, reverted for now will check and commit again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817998 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 10:42:32 +00:00
Deepak Dixit d1f85a7e5d Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817989 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 09:21:33 +00:00
Michael Brohl bf4bfeaf17 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.content.
(OFBIZ-9858)

The patch was modified. The changes in ContentWorker#checkConditions 
would have changed the logic and have to be reworked.

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817742 13f79535-47bb-0310-9956-ffa450edef68
2017-12-11 06:07:50 +00:00
Jacques Le Roux 30b82ab57e No functional changes.
Refactors (several things), formats and fixes (HOME_DUCUMENT seemed not good) 
the convertTree() method.

This is not used OOTB, so not quite sure how to test it, not documented enough.
I only found that in the initial Hans's commit: "Add a content navigation tree, 
demo data and including a DOS tree conversion program to be able to mimic an 
office file server"

 
    

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817726 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 20:10:11 +00:00
Michael Brohl 2c4f53f969 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.content.
(OFBIZ-9858)

The patch was modified. Instead of removing variables which were only 
intialized with null but used in method calls, I've added some TODO
tags to check them.

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817722 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 17:51:09 +00:00
Jacques Le Roux 22a85d9732 No functional changes, fixes a typo I put in with r1817709
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817710 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 12:47:59 +00:00
Jacques Le Roux d4b251f6e3 No functional changes, FileNotFoundException is included in IOException so no
need to have both doing the same thing

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817709 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 12:32:51 +00:00
Jacques Le Roux 55e770d437 No functional change, fixes formatting, I wonder if we should keep this code
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817705 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 12:06:06 +00:00
Jacques Le Roux a24ff2818c Fixes formatting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817704 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 12:05:08 +00:00
Michael Brohl f1eb4c8a8a Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.content.compdoc.
(OFBIZ-9825)

The patch was modified to optimize the code a bit more.

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817697 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 11:14:35 +00:00
Michael Brohl 4eadb514de Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.content.cms.
(OFBIZ-9824)

The patch was modified to optimize the logging.

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817694 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 11:08:58 +00:00
Michael Brohl 49bdacf80a Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.content.survey.
(OFBIZ-9816)

I've modified the patch and added some logging in PdfSurveyServices.java
instead of just printing the stacktrace. This class needs more work to
change the logging (see OFBIZ-10046).

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817686 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 10:29:32 +00:00
Michael Brohl 14154a293e Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.content.webapp.ftl.
(OFBIZ-9815)

Instead of just setting the locale to null I've added functionality to
retrieve the locale from the context map and set a default if there is
no locale provided.

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817684 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 10:10:52 +00:00
Michael Brohl 7d4d36a363 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.content.output.
(OFBIZ-9814)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817681 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 09:41:02 +00:00
Michael Brohl 87d9bbe590 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.content.layout.
(OFBIZ-9812)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817680 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 09:35:12 +00:00
Michael Brohl 7fab195048 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.content.data.
(OFBIZ-9811)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817679 13f79535-47bb-0310-9956-ffa450edef68
2017-12-10 09:33:46 +00:00
Deepak Dixit da9d776edb Fixed: Content related changes needs OFBiz server restart (OFBIZ-9922)
DataResourceWorker call the FreeMarkerWorker.renderTemplateFromString if dataTemplateTypeId is FTL, 
and pass the dataResource.lastUpdatedStamp to update the ftl cache.
But if you use ftl file as objectInfo so dataResource.lastUpdatedStamp will not change if you update the ftl file

Thanks Suraj Khurana for reporting the issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1815059 13f79535-47bb-0310-9956-ffa450edef68
2017-11-13 06:26:53 +00:00
Jacques Le Roux f78a98f616 No functional change, removes trailing blanks
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814117 13f79535-47bb-0310-9956-ffa450edef68
2017-11-02 22:10:23 +00:00
Jacques Le Roux a0e85e028a Fixed: Error on first access to Online Help
(OFBIZ-9925)

There are maybe better fixes but adding a default theme when it's null works

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814116 13f79535-47bb-0310-9956-ffa450edef68
2017-11-02 21:58:37 +00:00
Jacques Le Roux 3b1354db19 Fixed: The online help is broken
(OFBIZ-9837)

Completes r1814063

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814090 13f79535-47bb-0310-9956-ffa450edef68
2017-11-02 15:07:48 +00:00
Jacques Le Roux 778a0616cf Fixed: The online help is broken
(OFBIZ-9837)

When you get to cmssite/cms/APACHE_OFBIZ_HTML in trunk HEAD you get this error:
ERROR in error page, (infinite loop or error page not found with name 
[/error/error.jsp])

It because the related code does not use the Common Theme. And also because
the Css styles missed in themes/common/widget/Theme.xml 

While fixing that I also fixed few points of the Common Theme documentation 
in the main README.md file

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814063 13f79535-47bb-0310-9956-ffa450edef68
2017-11-02 11:18:33 +00:00
Deepak Dixit 33e4d8412b Inconsistent String Comparisons, Applied patch for Application content classes.
Thanks Devanshu Vyas for your contribution (OFBIZ-9254)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812256 13f79535-47bb-0310-9956-ffa450edef68
2017-10-16 08:19:31 +00:00
Jacques Le Roux e8a3c6f3d5 Fixed: Fix Default or Empty Catch block in Java and Groovy files
(OFBIZ-8341)

In many Java and Groovy files we have auto generated catch blocks or empty catch 
blocks. 
To avoid such exception swallowing this should be improved to at least log the 
error and also return error in case of service.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1807162 13f79535-47bb-0310-9956-ffa450edef68
2017-09-03 19:27:49 +00:00
Nicolas Malin 10af80b1a8 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step these step break all the UI
#2 The MacroScreenRenderer class now resolve the macro ftl library location from the model theme
The widget.properties lost all definition now managed by the theme definition

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806140 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 09:36:04 +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
Arun Patidar ae958b3415 Screen rendering error on ViewForumMessage page. Handled NPE. (OFBIZ-9362)
Applied slightly modified patch. Thanks Priya Sharma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802657 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 06:32:44 +00:00
Taher A. Alkhateeb 609c7d37e3 Improved: minor refactoring to remove miscellanous warnings
Minor code cleanup to remove:
- unused private variables
- unused imports
- improper object castings



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802172 13f79535-47bb-0310-9956-ffa450edef68
2017-07-17 16:59:18 +00:00
Deepak Dixit 982356f563 Improved: Remove hard-coded instances of "IN" with ModelService.IN_PARAM (OFBIZ-9434)
Thanks Devanshu and Pawan for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1801266 13f79535-47bb-0310-9956-ffa450edef68
2017-07-08 08:35:32 +00:00
Michael Brohl f965059347 Fixed: ContentWorker#findAlternateLocaleContent(Delegator, GenericValue, Locale)
does not use fallback locale.
(OFBIZ-9445)

If no alternate locale content for the requested locale is found, search for an 
alternate locale content with the locale configured in general.properties at 
locale.properties.fallback. If this one isn't found either we can still return 
the original content.

Thanks Tobias Laufkötter for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800853 13f79535-47bb-0310-9956-ffa450edef68
2017-07-05 09:42:23 +00:00
Michael Brohl 5333451e04 Reverted: ContentWorker#findAlternateLocaleContent(Delegator, GenericValue, Locale)
does not use fallback locale.
(OFBIZ-9445)

r1800780 introduced a bug which breaks the functionality. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800832 13f79535-47bb-0310-9956-ffa450edef68
2017-07-04 22:11:55 +00:00
Michael Brohl 6639ffa89d Fixed: ContentWorker#findAlternateLocaleContent(Delegator, GenericValue, Locale)
does not use fallback locale.
(OFBIZ-9445)

If no alternate locale content for the requested locale is found, search for an 
alternate locale content with the locale configured in general.properties at 
locale.properties.fallback. If this one isn't found either we can still return 
the original content.

Thanks Tobias Laufkötter for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1800780 13f79535-47bb-0310-9956-ffa450edef68
2017-07-04 12:56:38 +00:00
Jacques Le Roux aa644a0975 No functional change
Completes the JavaDoc of few methods which return an EntityListIterator

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798563 13f79535-47bb-0310-9956-ffa450edef68
2017-06-13 08:16:28 +00:00
Jacques Le Roux df46ff51de No functional change
Improves the documentation of few methods which return an EntityListIterator

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798495 13f79535-47bb-0310-9956-ffa450edef68
2017-06-12 17:20:36 +00:00