Commit Graph
10472 Commits
Author SHA1 Message Date
Rishi Solanki 25e99b2812 Fixed: Can enter empty content for product facility (OFBIZ-8323). A Generic Issue with EntityAutoEngine in which success message is appended to result after invoking create, update, delete, expire methods. Now engine would return success or error from invoking method and won't prepare the message its own. Same patch was committed and we receive test integration fails, minor modification in patch to put the message in the return map instead of map with key successMessage. Patch having problem with invokeUpdate.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1808833 13f79535-47bb-0310-9956-ffa450edef68
2017-09-19 07:49:37 +00:00
Rishi Solanki c0f2e5ee8f Reverted: Test Integration failed due to fix done in 1807908. OFBIZ-8323
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1807915 13f79535-47bb-0310-9956-ffa450edef68
2017-09-09 16:01:39 +00:00
Rishi Solanki ec9cba10ed Fixed: Can enter empty content for product facility (OFBIZ-8323). A Generic Issue with EntityAutoEngine in which success message is appended to result after invoking create, update, delete, expire methods. Now engine would return success or error from invoking method and won't prepare the message its own.
Thanks to Lalit Dashora for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1807908 13f79535-47bb-0310-9956-ffa450edef68
2017-09-09 14:11:51 +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
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
Jacques Le Roux 8087b20f19 No functional change, removes trailing blanks
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806945 13f79535-47bb-0310-9956-ffa450edef68
2017-09-01 12:23:30 +00:00
Nicolas Malin dcdc3855a6 Fixed: Missing to convert a showDescription from widget.properties to modelTheme on the macroFormRendere.java to prepare the lookup macro (OFBIZ-9138 Create a common theme)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806821 13f79535-47bb-0310-9956-ffa450edef68
2017-08-31 16:19:29 +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
Nicolas Malin de11d898ad Fixed: HtmlFormMacroLibary.ftl contains direct call to widget.properties (OFBIZ-9138 Create a common theme)
Instead of use the properties on the current theme, some ftl macro present in the file HtmlFormMacroLibary.ftl used a directl call to widget.properties.
To help the code reader, the modelTheme has been set on the root ftl context, and the previous widget.properties call replace by modelTheme call

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806742 13f79535-47bb-0310-9956-ffa450edef68
2017-08-30 21:40:33 +00:00
Nicolas Malin 2555742bf3 Fixed: the lookup property showDescription not present in common-theme (OFBIZ-9138 Create a common theme)
Display or not a description hasn't been loaded in the theme definition. I finished this migration to be sure to found all properties linked to lookups in the same place.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806741 13f79535-47bb-0310-9956-ffa450edef68
2017-08-30 21:33:47 +00:00
Deepak Dixit 29461cdc47 Fixed: Found some more vlaue=dollor pattern in set element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806329 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 20:33:37 +00:00
Deepak Dixit 1a7aee6685 Improved:Use from-field pattern instead of value=dollor pattern in 'set' element
Apply slightly modified patch from jira issue, fixed some typo (OFBIZ-9607)
Thanks Suraj Khurana and Rohit Rai for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806326 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 20:23:40 +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
Jacques Le Roux f973dc8283 Fixed: LabelManager doesn't search labels in all elements in xml
(OFBIZ-9606)

Currently, label manager for xml search only for fail-property elements in xml 
files, it should also search for the property-to-field, default-message element 
in xml files.

Thanks: Suraj Khurana

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806269 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 07:43:54 +00:00
Jacques Le Roux 3cb8812782 Fixed: Improvements in LabelReferences class
(OFBIZ-9623)

For Java:
Current support is only for occurrences like "UtilProperties.getMessage(",
 but there are other occurrences such as "uiLabelMap.get(" 
in Java as well. Need to add support for same.

For groovy:
After some recent improvements for groovy handling, still, there is a 
possibility that someone is using "UtilProperties.getMessage(" in groovy files 
as well, so IMO, that must also be handled.

For XML forms:
In XML forms current support in handled for auto-fields-service and 
auto-fields-entity but there are some occurrences of tooltip element of 
field tag as well, that must also be handled.

For XML Simple Methods:
Doesn't handle case of property-to-field and default-message elements. 
(Separate ticket created OFBIZ-9606, just adding it here for reference)

Thanks: Suraj Khurana

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806266 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 07:37:49 +00:00
Rishi Solanki 8d9b566605 Reverted: Local changes mistakenly committed in revision 1806258
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806259 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 06:05:15 +00:00
Rishi Solanki b0651cbe4d Improvement: Move all data in applications to the datamodel component. (OFBIZ-9501)
Moved the data which belongs to content with seed reader.
Thanks Saurabh Dixit for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806258 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 05:54:15 +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
Jacques Le Roux 29a3f4d2f1 Fixed: NullPointerException when calling EntityQuery#getFieldList
(OFBIZ-9624)

When performing EntityQuery#getFieldList without specifying distinct a 
NullPointerException is thrown, because of the condition if (this.distinct). 
It implicitly calls this.distinct.booleanValue() which throws the exception if 
distinct is null.

Thanks: Tobias Laufkötter

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806220 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 19:49:15 +00:00
Deepak Dixit 1cc65c1d2b Fixed: Fixed typo in FindGeneric.groovy, also removed the visualThemeSetId for common theme. Now common theme will be display on backend visual theme popup. (OFBIZ-9138)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806216 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 19:04:11 +00:00
Deepak Dixit 90abb7b919 Fixed: Warning related to duplicate type assignment for widget attribute in theme.xsd file
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806209 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 18:21:59 +00:00
Deepak Dixit 482cc1f979 Fixed: Updated deprecated element type set mixed as true in services.xsd as we are using it in mixed mode. Also moved deprecated sequence after namespace.Found this issue while reading log, this will fix those warning.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806206 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 18:13:06 +00:00
Nicolas Malin a5644da3e4 Fixed: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Forgot to complete the xsd with element common-screens as child of theme and the attribute name on the same element

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806169 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 13:12:22 +00:00
Nicolas Malin 3bc6806561 Fixed: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Forgot to add the visualTheme on automatic attribute forward to service context.
 Thanks to Aditya Sharma to raise it with the issue OFBIZ-9622


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806164 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 12:29:22 +00:00
Nicolas Malin a728d0c3b0 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step
#10 when you missed a definition on your theme, improve the error message to understand what template failed
Now the common-theme would be functional

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806151 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 10:04:44 +00:00
Nicolas Malin 40fdd2ca73 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step 
#9 Change all set screen and script that call widget.properties values replaced by call to modelTheme

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806150 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 10:02:34 +00:00
Nicolas Malin dad46a5d6b Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step these step break all the UI
#8 Migrate the ListVisualThemes screen to use theme definition instead information from the VisualTheme entity

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806148 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 09:53:56 +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
Nicolas Malin 871ed108a6 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Five step WARNING these step is separate on many commit break all the UI
#1 Prepare the common screens to retrieve widget.properties, VisualThemeRessources and common screen location from the modelTheme

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806137 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 09:31:58 +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
Deepak Dixit ddf43d864d Removed images from framework component-load.xml as we moved images into common-theme.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806128 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 06:50:03 +00:00
Nicolas Malin 37ac02106b Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Third step bis restore CommonScreens.xml with all screens redirect to common-theme

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806093 13f79535-47bb-0310-9956-ffa450edef68
2017-08-24 21:56:35 +00:00
Nicolas Malin aec57b51c5 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Third step, move macro ftl libraries and ftl template present on framework common to common theme
At this step, the common-theme is forced like the common component previously.

Main common screens present on CommonScreens.xml, LookupScreens.xml and HelpScreens.xml are moved to common screen with a forced rewrite to common-theme 
Warning this commit is going to follow with a other commit for CommonScreens.xml because LookupScreens.xml and HelpScreens.xml are recreated on common-theme, but to keep the history of CommonScreens.xml it was moved entirely, the second commit restore it with redirect call.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806091 13f79535-47bb-0310-9956-ffa450edef68
2017-08-24 21:55:06 +00:00
Nicolas Malin 15da786110 Implemented: Continue the common-theme upload (OFBIZ-9138 Create a common theme)
Second step, move all images and js library on the common-theme component and move the dedicate webapp image (for continuous compatibility)
The components image is removed from framework.

Warning this commit raise the problem that many images has been uploaded on the framework directory (properties image.server.path and image.management.path) and we need to found a solution to set them out static folder to a dynamic folder like runtime.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806084 13f79535-47bb-0310-9956-ffa450edef68
2017-08-24 20:38:19 +00:00
Nicolas Malin 965fed43d2 Implemented: Start the common-theme upload (OFBIZ-9138 Create a common theme)
First step, commit model theme engine :
ModelTheme: java object who interact with system and theme definition
VisualTheme: java object who interact with the user session and the theme
ThemeFactory: java factory to load and access to VisualTheme and ModelTheme with the cache
widget-theme.xsd: dtd to define a theme

Load also the main structure common-theme component, (empty for all template, screen, style or js) with this theme definition.
It's not functional at this time


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806076 13f79535-47bb-0310-9956-ffa450edef68
2017-08-24 19:01:34 +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
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 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 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