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
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
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
(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
(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
(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
(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
(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
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
* 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
* 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
=====================================
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
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