Commit Graph
43 Commits
Author SHA1 Message Date
Michael Brohl ee46dbb019 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.common.
(OFBIZ-9681)

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811438 13f79535-47bb-0310-9956-ffa450edef68
2017-10-07 15:47:59 +00:00
Michael Brohl cf3081a277 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.common.preferences.
(OFBIZ-9640)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811433 13f79535-47bb-0310-9956-ffa450edef68
2017-10-07 14:51:43 +00:00
Michael Brohl a7beb48720 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.common.uom.
(OFBIZ-9634)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811428 13f79535-47bb-0310-9956-ffa450edef68
2017-10-07 14:12:51 +00:00
Michael Brohl 2a66a06aef Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.common.qrcode.
(OFBIZ-9633)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811427 13f79535-47bb-0310-9956-ffa450edef68
2017-10-07 14:10:50 +00:00
Michael Brohl 404139505e Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.common.period.
(OFBIZ-9631)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811426 13f79535-47bb-0310-9956-ffa450edef68
2017-10-07 14:08:49 +00:00
Michael Brohl 31a2e43496 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.common.login.
(OFBIZ-9630)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811424 13f79535-47bb-0310-9956-ffa450edef68
2017-10-07 14:06:21 +00:00
Michael Brohl 36492861ee Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.common.image.
(OFBIZ-9629)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811423 13f79535-47bb-0310-9956-ffa450edef68
2017-10-07 14:00:27 +00:00
Michael Brohl 17db653e57 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.common.email.
(OFBIZ-9628)

Applied modified patch due to intermediate changes and removed an
obsolete import.

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811422 13f79535-47bb-0310-9956-ffa450edef68
2017-10-07 13:56:48 +00:00
Michael Brohl 2921eff056 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.common.authentication.
(OFBIZ-9627)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811421 13f79535-47bb-0310-9956-ffa450edef68
2017-10-07 13:49:20 +00:00
Deepak Dixit 259a585512 Fixed: Manually changed the date locale js for cs locale
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1809413 13f79535-47bb-0310-9956-ffa450edef68
2017-09-23 12:39:52 +00:00
Deepak Dixit 344e97909a Fixed: JsLanguageFilesMapping.java location in createJsLanguageFileMapping service, and commiting the auto generated java file for language mapping js.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1809410 13f79535-47bb-0310-9956-ffa450edef68
2017-09-23 12:11:31 +00:00
Deepak Dixit 88493836bc Improved: Moved jquery related js/plugins from images to common-theme webapp and made changes accordinlgy. (OFBIZ-5776)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1809389 13f79535-47bb-0310-9956-ffa450edef68
2017-09-23 10:41:28 +00:00
Jacques Le Roux 15cc03f9c0 Improved: CommonEvents improvements
(OFBIZ-9673)

Reverts r1807045. There is no justification to remove private for "no modifier"

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1807142 13f79535-47bb-0310-9956-ffa450edef68
2017-09-03 12:43:15 +00:00
Jacques Le Roux db7448fdfb Improved: CommonEvents improvements
(OFBIZ-9673)

Replaces private to protected so that CommonEvents.java is more usable to 
derived classes.

Thanks: Wai

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1807045 13f79535-47bb-0310-9956-ffa450edef68
2017-09-02 12:25:13 +00:00
Nicolas Malin db7872484c Fixed: Missing to use the modelTheme for the attached screen on email (OFBIZ-9138 Create a common theme)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806815 13f79535-47bb-0310-9956-ffa450edef68
2017-08-31 15:39:29 +00:00
Nicolas Malin b15e57df9b Fixed: correct JsLanguageFilesMapping template path from framework/common to common-theme (OFBIZ-9138 Create a common theme)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806812 13f79535-47bb-0310-9956-ffa450edef68
2017-08-31 15:15:25 +00:00
Deepak Dixit 90181172a1 Fixed: Updated images component reference path, as we removed images component and now these files are part of common-theme componnet.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806273 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 08:30:02 +00:00
Nicolas Malin 0b33186d6f Fixed: Correct library ftl call to render the email body (OFBIZ-9138 Create a common theme)
add possibility to call the ThemeFactory.resolveTheme() with empty request if the visualTheme normaly present on the service context isn't found, so we return the default theme define in general.properties
Thanks to Jacques for raise this problem

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806237 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 21:25:26 +00:00
Nicolas Malin 10fa4452b7 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Four step load the visualTheme in user session, freemarker, screen, groovy and service context
Add util to resolve easily a visualTheme

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806134 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 08:18:35 +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 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
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
Jacques Le Roux c7bda90601 Fixes a bug due to r1797222. I missed in some cases the EntityListIterator
might not exist in the context (this seems still weird to me, but obviously 
there are cases...)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798060 13f79535-47bb-0310-9956-ffa450edef68
2017-06-08 13:49:23 +00:00
Jacques Le Roux 2388ed61f7 No functional changes.
Replaces Writer.close() in finally by try-with-ressource

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797743 13f79535-47bb-0310-9956-ffa450edef68
2017-06-06 07:40:51 +00:00
Jacques Le Roux e76e9c04de No functional changes.
Replaces entityListIterator.close() in finally by try-with-ressource

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797222 13f79535-47bb-0310-9956-ffa450edef68
2017-06-01 13:23:40 +00:00
Jacques Le Roux 21401486e0 Improved: EntityListIterator closed but not in case of exception
(OFBIZ-9385)

This is an improvement only because no cases were reported. But obviously in 
case of unlucky exception after the EntityListIterator creation and before it's 
closed the EntityListIterator remains in memory. 
It should be closed in EntityListIterator.finalize() but the less happens there 
the better.

The solution is to use try-with-ressources

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797159 13f79535-47bb-0310-9956-ffa450edef68
2017-06-01 08:12:12 +00:00
Deepak Dixit 590573f9f2 Improved: Remove hard-coded success/error message variables set in service output (OFBIZ-9303)
Thanks Devanshu Vyas for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1795340 13f79535-47bb-0310-9956-ffa450edef68
2017-05-16 17:02:22 +00:00
Deepak Dixit 2e7aacb148 Improved: Remove unnecessary cc and bcc , Applied slightly modified patch from jira issue.
(OFBIZ-9231) 

Thanks Suraj Khurana for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1786116 13f79535-47bb-0310-9956-ffa450edef68
2017-03-09 09:13:22 +00:00
Jacques Le Roux 4783629f62 Improved: Make xssi prefix configurable
(OFBIZ-9169)

In OFBIZ-5409 a prefix was added for GET ajax requests.  
It would be beneficial if the prefix could be configured instead of hard coded

Pierre Smits suggested to make the feature multi-tenant aware. I made signature 
and calls changes based on Chris Howe's patch.

Thanks: Chris Howe and Pierre Smits 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1777942 13f79535-47bb-0310-9956-ffa450edef68
2017-01-09 09:12:55 +00:00
Michael Brohl 97ba34128e Improved: refactor javadocs in OFBiz to be standards compliant
(OFBIZ-9144)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1774815 13f79535-47bb-0310-9956-ffa450edef68
2016-12-17 23:34:51 +00:00
Taher A. Alkhateeb 71f512a0d2 Improved: refactor javadocs in OFBiz to be standards compliant
(OFBIZ-9144)

This is the first commit to the above mentioned issue which fixes many javadoc
errors dispersed through the different components. The fixes are not
necessarily improvements to the javadocs but rather making them valid javadocs
to prevent reporting errors from gradle


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1774154 13f79535-47bb-0310-9956-ffa450edef68
2016-12-14 09:22:32 +00:00
Jacopo Cappellato bd40d8526f Fixed: a series of wrong argument names in Javadoc comments.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1773338 13f79535-47bb-0310-9956-ffa450edef68
2016-12-09 08:49:56 +00:00
Jacques Le Roux 361145db91 Fixed: Errormessage is displayed twice in LoginEvents.java
(OFBIZ-9125)

Issue:
The errormessage "The password does not match the pattern" is called twice 
in LoginServices.java.

Fix:
Delete second assignment for variable "errMsg".

jleroux: I simply removed the author commented out comment (2 lines)

Thanks: Heiko Elberg


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1771516 13f79535-47bb-0310-9956-ffa450edef68
2016-11-26 22:32:42 +00:00
Deepak Dixit b150af15ea Improved: UtilValidate isEmpty and isNotEmpty methods not used correctly
(OFBIZ-8413)

Thanks Pawan Verma for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1766868 13f79535-47bb-0310-9956-ffa450edef68
2016-10-27 19:21:41 +00:00
Jacopo Cappellato b84345831b Improved: cleanups and enhancements in the FreeMarkerWorker class, and client
code using it, that wraps most of the OFBiz integration with FreeMarker.

This is the list of the main modifications:
* simplified and cleaned up the public methods of FreeMarkerWorker, used to 
retrieve and render Freemarker templates and changed client code accordingly to 
use them
* removed unused methods in FreeMarkerWorker and made some others private
* improved the integration code in FreeMarkerWorker to better use the Freemarker 
API and specifically to leverage the various TemplateLoaders and the Freemarker 
caching mechanism; it is now possible to switch the OFBiz legacy template 
caching mechanism to use the Freemarker one instead
* improved the implementation of Freemarker template rendering from strings 
(used by DataResourceWorker): it now leverages the Freemarker's 
StringTemplateLoader that provides the ability to cache the strings, retrieved 
from DataResources records, based on the timestamp of the last modification
* moved freemarkerImports.properties from "widget" to "base" component, and 
changed its content (and the content of the associated templates 
AutoImportTemplate.ftl and HtmlTemplate.ftl) to remove the dependency from base 
to widget&common; some resources of "widget" and "common" are still referenced 
from AutoImportTemplate.ftl (that is in "base") but even if they are soft 
dependencies: if they are missing the system will load properly without any 
error or warning; before this change it was impossible to use, or unit test, 
FreeMarkerWorker before the "widget" and "common" components were loaded by the 
system, now it is possible
* created a new class for unit tests for FreeMarkerWorker, named 
FreeMarkerWorkerTests: at the moment it contains just one simple unit test but 
more should be implemented
* refactored WebToolsServices.entityImport(...) to leverage the 
FreeMarkerWorker.renderTemplate(...) method to run the Freemarker template, 
rather than dealing with the Freemarker API directly; this is now possible 
thanks to the cleanups and improvements done in the FreeMarkerWorker class; this 
same approach should be implemented for a few other similar integration points 
(mostly in the "content" component); this is a TODO item
* moved the encodeDoubleQuotes(...) method from FreeMarkerWorker to 
MacroFormRenderer and made it private since this is the only calss using it and 
its logic is not related to FreeMarker



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1762227 13f79535-47bb-0310-9956-ffa450edef68
2016-09-25 17:20:58 +00:00
Ashish Vijaywargiya b2a4dd1d91 Improved: Clean up commented out code in Java source for Common component.
(OFBIZ-8037)
Thanks: Harsh for the contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761237 13f79535-47bb-0310-9956-ffa450edef68
2016-09-17 13:52:40 +00:00
Jacopo Cappellato 9778235247 OFBIZ-8142 Additional cleanups related to OFBiz servlet filters
* introduced a constant for the "control" mount point
* moved public fields and methods from the ContentUrlFilter to the OfbizContentAltUrlTransforms and made them private (since they are only used by this class)
* no more need for the UrlServletHelper to extend the ContextFilter



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759368 13f79535-47bb-0310-9956-ffa450edef68
2016-09-06 07:09:03 +00:00
Jacopo Cappellato 948dbc646c OFBIZ-8142 A series of cleanups related to OFBiz servlet filters:
* removed an unused filter (UrlRegexpContextFilter)
* moved a series of methods from ContextFilter to WebAppUtil, where they make more sense; changed one of them to be a static method
* made private some methods of ContextFilter and WebAppUtil because they were not used outside of their classes



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759332 13f79535-47bb-0310-9956-ffa450edef68
2016-09-05 16:56:04 +00:00
Deepak Dixit e165a4fd2c (OFBIZ-7980) Applied slightly modified patch from jira issue
=====================================
Add UI labels for success / error messages in common component
=====================================
Thanks Tanmay for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759061 13f79535-47bb-0310-9956-ffa450edef68
2016-09-03 09:05:46 +00:00
Jacques Le Roux e4d3d880e8 An updated patch from Supatthra Nawicha for "PrepareFind Service Ignores timeZone Parameter When Performing Date/Time Calculations" https://issues.apache.org/jira/browse/OFBIZ-3739
The patch was stale for trunk, but OK for branches

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1757102 13f79535-47bb-0310-9956-ffa450edef68
2016-08-22 04:10:56 +00:00
Deepak Dixit 834691742b (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Taher A. Alkhateeb b37ef2d280 Migrate ALL java files from /src to /src/main/java - OFBIZ-7790
This is the first of two steps in the above mentioned JIRA. This
first step changes the java source directory for every component
from /src to /src/main/java. The next step will be adding unit
tests to every component in /src/test/java

Thank you to Deepak Dixit for tips on how to use the SVN commands
to make the appropriate file moving.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752838 13f79535-47bb-0310-9956-ffa450edef68
2016-07-15 14:17:14 +00:00