Commit Graph
9491 Commits
Author SHA1 Message Date
Gil Portenseigne 3f23e45b7b Implemented: Refactor EntityUtil findBy methods using Stream API
(OFBIZ-10537)

Fixed variable name to make it more meaningful

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839926 13f79535-47bb-0310-9956-ffa450edef68
2018-09-03 09:33:21 +00:00
Gil Portenseigne e316f2165d Implemented: Refactor EntityUtil findBy methods using Stream API
(OFBIZ-10537)

Thanks Jacques and Mathieu for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839763 13f79535-47bb-0310-9956-ffa450edef68
2018-08-31 15:32:02 +00:00
Suraj Khurana 2d2aba0a4c Improved: Empty header row should not render if list to render in file is empty.
(OFBIZ-7598)
Thanks everyone for your inputs and suggestions.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839729 13f79535-47bb-0310-9956-ffa450edef68
2018-08-31 06:33:07 +00:00
Deepak Dixit f1ba3ae6a8 Improved: Removed comment from ServerHitBin.java related to mysql Fractional Seconds related issue, this issue fixed under OFBIZ-9337
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839655 13f79535-47bb-0310-9956-ffa450edef68
2018-08-30 09:35:25 +00:00
Jacques Le Roux 7f4dec9441 Fixed: Add method attribute to request-map to controll a uri can be called GET
or POST only
(OFBIZ-10438)

The problem was r1838081 prevented to serialise requests.

Like in ordermgr/control/updateCheckoutOptions/quickcheckout where 
updateCheckoutOptions and quickcheckout are serialised to update the check out 
after updateCheckoutOptions is done and then get back to the screen with 
quickcheckout. 

CheckoutOptions.ftl is a good example of this usage.

Thanks: Deepak Nigam for initial report and Mathieu for fixing it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839451 13f79535-47bb-0310-9956-ffa450edef68
2018-08-28 16:06:23 +00:00
Suraj Khurana 5d317c08de Reverted: Empty header row should not render if list to render in file is empty.
(OFBIZ-7598)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838823 13f79535-47bb-0310-9956-ffa450edef68
2018-08-24 11:37:16 +00:00
Jacques Le Roux e073f7d29e Improved: no functional change
Previous commit 
    "Fixes the API doc, removes a return when there is not"
was wrong, the return missed a description rather


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838419 13f79535-47bb-0310-9956-ffa450edef68
2018-08-20 09:55:32 +00:00
Jacques Le Roux a7dd9efb2b Improved: no functional change
Fixes the API doc, removes a return when there is not

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838418 13f79535-47bb-0310-9956-ffa450edef68
2018-08-20 09:53:50 +00:00
Aditya Sharma 24f846174c Improved: Remove checks to store only 250 characters of URL in VisitHandler.getVisit() & ServerHitBin.saveHit()
(OFBIZ-10508)
When the code was committed the 'URL' field type had a size of 255 characters only which was later changed to 2000 characters. So, the above code logic to restrict no of characters can be removed now. 
Removed null pointer check for initialRequest and initialReferrer as it is already handled while setting the values in UtilHttp.setInitialRequestInfo() method.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838256 13f79535-47bb-0310-9956-ffa450edef68
2018-08-17 12:46:59 +00:00
Shi Jinghai ddf3540817 Implemented: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438

Thanks: Mathieu Lirzin for the contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838081 13f79535-47bb-0310-9956-ffa450edef68
2018-08-15 11:45:45 +00:00
Shi Jinghai c9f5a346ec Implemented: Remove org.apache.tomcat.util.net.secure_protocol_version from json output
OFBIZ-10443

Add org.apache.tomcat.util.net.secure_protocol_version to ignoreAttrs.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838080 13f79535-47bb-0310-9956-ffa450edef68
2018-08-15 11:40:19 +00:00
Deepak Dixit 2fe25b3d79 Improved: Replace #assign with #local in all the ftl macros
(OFBIZ-10516)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837830 13f79535-47bb-0310-9956-ffa450edef68
2018-08-10 18:49:03 +00:00
Deepak Dixit e7a7ba4876 Improved: Rendering different HTML container types with ScreenRenderer
(OFBIZ-10495)
Applied slightly modified patch 
Thanks Dennis Balkir for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837827 13f79535-47bb-0310-9956-ffa450edef68
2018-08-10 18:23:11 +00:00
Taher A. Alkhateeb 6c28c16c58 Improved: disable DTDs for XML-RPC requests
(OFBIZ-10509)

Disable any doctype declarations in XML-RPC requests to OFBiz to enhance
performance and security.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837697 13f79535-47bb-0310-9956-ffa450edef68
2018-08-09 08:27:57 +00:00
Jacques Le Roux 73096d0962 Improved: no functional change, was missing the ASL2 license
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837642 13f79535-47bb-0310-9956-ffa450edef68
2018-08-08 11:42:12 +00:00
Gil Portenseigne 266b63ac12 Fixed: Initial set of hasLoggedOut flag when logging in
(OFBIZ-10506)

Thanks Dennis for your patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837584 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 09:34:53 +00:00
Gil Portenseigne ceea6ce791 Improved : Remove all unnecessary boxing and unboxing in Java classes
(OFBIZ-10504)

Thanks Taher, Jacques, Mathieu and Rishi for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837577 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:30:43 +00:00
Taher A. Alkhateeb 22d780cdae Improved: Further refactor MapContext and MapStack
(OFBIZ-10485)

This commit applies multiple new refactoring enhancements as follows:
- rename stackList to contexts (the data structure holding the context Deque)
- refactor the size function to utilize streams to sum all keys
- Implement a function "entryStream()" that returns a stream of all keys in the
  correct sequential order and utilize this function in multiple functions for
  iterating over the keys including "containsValue", "values" and "entrySet".
  This implementation is necessary to avoid code repetition and ensure correct
  order with no duplicates
- Re-design the get functions of the context map to use a generic function with
  a functional interface "withMapContainingKey". The purpose of it is to avoid
  checking for nulls and instead use the "containsKey" function followed by the
  injected lambda expressions in both signatures of the get function

Thanks: Mathieu Lirzin for the patch and implementing suggested changes.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837462 13f79535-47bb-0310-9956-ffa450edef68
2018-08-05 12:36:09 +00:00
Gil Portenseigne d3021c213b Improved : Use the stream API in FormRenderer
(OFBIZ-10505)

Thanks Mathieu for the patches

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837460 13f79535-47bb-0310-9956-ffa450edef68
2018-08-05 09:18:20 +00:00
Taher A. Alkhateeb e534c3b3b7 Improved: refactored the MapContext object with multiple improvements
(OFBIZ-10485)

- Removed the constructor and factory method "getMapContext" as it was
  redundant and does not add any value
- Replaced manual for-loop for collection walking in multiple methods with
  simple stream calls applied declaratively with less noise in the code.
- Fully removed the ListSet custom data structure with as that data structure
  did not serve any meaningful purpose and it is always better to rely on
  the java builtin data structures where possible. Construction was replaced
  with a HashSet instead.

Thanks: Mathieu Lirzin for your time, discussions and patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837409 13f79535-47bb-0310-9956-ffa450edef68
2018-08-04 08:39:16 +00:00
Gil Portenseigne 03107374d2 Improved : Inline ‘getFieldListsByPosition’ method
(OFBIZ-10503)

Refactors ‘getFieldListsByPosition’ method using stream. Thanks Mathieu for the patches

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837348 13f79535-47bb-0310-9956-ffa450edef68
2018-08-03 07:28:34 +00:00
Gil Portenseigne b16339e90a Improved : Factorize and Refactor filtering of duplicated ‘use-when’ fields in ‘FormRenderer’
(OFBIZ-10502)

Thanks Mathieu for providing unit test and improvment patches

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837254 13f79535-47bb-0310-9956-ffa450edef68
2018-08-01 20:02:09 +00:00
Deepak Dixit 252828d8b0 Improved: Improved: Use application/javascript instead of text/javascript
(OFBIZ-10492)
Added missing file in last commit

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836893 13f79535-47bb-0310-9956-ffa450edef68
2018-07-28 12:21:52 +00:00
Deepak Dixit ef0c694a46 Improved: Use application/javascript instead of text/javascript
(OFBIZ-10492)
Replace text/javascript with application/javascript in all the script tag

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836886 13f79535-47bb-0310-9956-ffa450edef68
2018-07-28 10:51:52 +00:00
Deepak Dixit 99220516cb Improved: Use application/javascript instead of text/javascript
(OFBIZ-10492)
Updated compressibleMimeType list and use application/javascript in place of text/javascript

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836871 13f79535-47bb-0310-9956-ffa450edef68
2018-07-28 06:26:48 +00:00
Michael Brohl fc3c92f7d6 Fixed: Corrected wrong import introduced in 1813640.
Thanks Scott Gray for reporting.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836796 13f79535-47bb-0310-9956-ffa450edef68
2018-07-27 09:30:13 +00:00
Taher A. Alkhateeb 2c4907a873 Improved: refactor the MapContext to use a Deque instead of List interface
(OFBIZ-10485)

The MapContext and MapStack classes are abstracting away the underlying
LinkedList implementation behind a List. The problem is that the push and pop
methods are implemented awkwardly by using index zero or using size() to find
the ends of the collection.

Thus this improvement maintains the same code signature but replaces the List
interface with the Deque to utilize the getFirst(), addFirst() and addLast()
functions making the code cleaner and more declaractive.

Thanks: Mathieu Lirzin for the patch and explanation of your work.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836710 13f79535-47bb-0310-9956-ffa450edef68
2018-07-26 10:02:06 +00:00
Taher A. Alkhateeb bf655a7d16 Improved: Add missing @override annotations in MapContext
(OFBIZ-10485)

Those are missing for methods that override super methods with identical signatures.

Thanks: Mathieu Lirzin for your patch and analysis


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836632 13f79535-47bb-0310-9956-ffa450edef68
2018-07-25 13:25:05 +00:00
Taher A. Alkhateeb a80c623fe7 Improved: Reafctor MapContext by removing unused code
(OFBIZ-10485)

- Remove unused functions that are only supposed to be used internally.
- Remove redundant warning and @override annotations

Thanks: Mathieu Lirzin for the patch, and careful analysis of code.
Thanks: Pradhan Sharma for reviewing the work


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836631 13f79535-47bb-0310-9956-ffa450edef68
2018-07-25 13:21:32 +00:00
Deepak Dixit 397628ba7d Improved: Remove use of deprecated language attribute from script tag
(OFBIZ-10491)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836545 13f79535-47bb-0310-9956-ffa450edef68
2018-07-24 11:26:23 +00:00
Deepak Dixit 2f6618753c Fixed: compressableMimeType is not a valid attribute of apache http connector
(OFBIZ-10487)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836144 13f79535-47bb-0310-9956-ffa450edef68
2018-07-18 06:42:10 +00:00
Taher A. Alkhateeb a93c963f54 Improved: sanitized the output of XML-RPC when errors are reported.
(OFBIZ-10484)

This is implemented by overriding the parent "execute" method with a more
sanitized output for clarity and enhanced security.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836141 13f79535-47bb-0310-9956-ffa450edef68
2018-07-18 06:30:15 +00:00
Gil Portenseigne 00a1a84053 Improved : File transfer management with communicationEvent and new contactMech FTP_ADDRESS
(OFBIZ-10245)

Rename SQL reserved words, thanks Deepak for reporting the issue and providing a patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835994 13f79535-47bb-0310-9956-ffa450edef68
2018-07-15 20:49:28 +00:00
Deepak Dixit b13070d7fa Improved: Standardise layout for Party
(OFBIZ-10334)
Thanks Dennis Balkir for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835957 13f79535-47bb-0310-9956-ffa450edef68
2018-07-15 09:10:49 +00:00
Jacques Le Roux 8fe6c1d23c Improved: no functional change, simply adds XXX tag :)
Forgot I had other pending changes :/ 
Now really removed, automated things can sometimes screw you :/


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835896 13f79535-47bb-0310-9956-ffa450edef68
2018-07-14 10:16:46 +00:00
Jacques Le Roux 2ebcd632b6 Improved: no functional change, simply adds XXX tag :)
Forgot I had other pending changes :/ now removed


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835895 13f79535-47bb-0310-9956-ffa450edef68
2018-07-14 10:12:38 +00:00
Jacques Le Roux 996311e7a7 Improved: no functional change, simply adds XXX tag :)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835893 13f79535-47bb-0310-9956-ffa450edef68
2018-07-14 09:58:22 +00:00
Suraj Khurana 65b5b117f7 Improved: Empty header row should not render if list to render in file is empty.
(OFBIZ-7598)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835869 13f79535-47bb-0310-9956-ffa450edef68
2018-07-14 05:10:00 +00:00
Jacques Le Roux b4ad57201f Improved: Rename the misnamed setUserLocale.js to setUserTimeZone.js
(OFBIZ-10472)

At the same time renames setLocaleFromBrowser to SetTimeZoneFromBrowser 
everywhere it's needed
And adds a documentation about the auth mismatch as suggested by Mathieu

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835628 13f79535-47bb-0310-9956-ffa450edef68
2018-07-11 11:16:07 +00:00
Jacques Le Roux 7906358abe Reverted: setLocaleFromBrowser requires authentification
(OFBIZ-10460)

The setLocaleFromBrowser request map defined in common-controller.xml has an 
attribute of auth=false
While the service associated with it in framework/common/servicedef/services.xml 
has an attribute of auth=true.

jleroux: this was missing in the initial patch. At OFBIZ-9264 the description is
    "it sets the time zone of the user logged in to it's browser time zone."
So being logged in seems needed, hence better to set auth=true everywhere

Thanks: as reported by Deepak in OFBIZ-10460 there is a problem with that.
So we need keep the inconsistence and the service protected.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835616 13f79535-47bb-0310-9956-ffa450edef68
2018-07-11 08:14:29 +00:00
Aditya Sharma 130df396ff Improved: Using 'buttontext' styling for the index of service engine
(OFBIZ-10467)
To give OFBiz a more equal look, the style buttontext can be added for the alphabetical index of the service engine main page.
This makes the buttons look alike with the ones that are already there for the entity engine main page.
Thanks: Dennis Balkir for patch and Pierre Smits & Jacques Le Roux for the discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835612 13f79535-47bb-0310-9956-ffa450edef68
2018-07-11 07:05:11 +00:00
Gil Portenseigne 8686e1f4c7 Improved: GetLocaleList call can provide duplicate results
(OFBIZ-10458)

Just improve hasFilter condition to use .with groovy notation.

Thanks Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835599 13f79535-47bb-0310-9956-ffa450edef68
2018-07-10 19:59:20 +00:00
Jacques Le Roux eaffb3d0f8 Fixed: setLocaleFromBrowser requires authentification
(OFBIZ-10460)

The setLocaleFromBrowser request map defined in common-controller.xml has an 
attribute of auth=false
While the service associated with it in framework/common/servicedef/services.xml 
has an attribute of auth=true.

jleroux: this was missing in the initial patch. At OFBIZ-9264 the description is
    "it sets the time zone of the user logged in to it's browser time zone."
So being logged in seems needed, hence better to set auth=true everywhere

Thanks: Mathieu Lirzin for report

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835586 13f79535-47bb-0310-9956-ffa450edef68
2018-07-10 17:31:50 +00:00
Jacques Le Roux e20b34bc24 Implemented: Add a mechanism to prevent the usage of EntitySyncRemove
(OFBIZ-10008)

No configurations is available to disable usage of EntitySyncRemove. 
And it's creating problems when having a large database and frequent delete 
operations.

saveEntitySyncRemoveInfo is used to create EntitySyncRemove records in 
GenericDelegator.removeValue() and removeByPrimaryKey().

This adds a mechanism to prevent the usage of EntitySyncRemove by adding a 
property in general.properties file used to configure in entityengine.xml 






git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835296 13f79535-47bb-0310-9956-ffa450edef68
2018-07-07 07:46:04 +00:00
Gil Portenseigne f428a7e803 Fixed: GetLocaleList call can provide duplicate results
(OFBIZ-10458)

A new Junit test is implemented to validate that no duplicates are present.
Groovy service has been refactored to use a more functional style

Thanks Mathieu Lirzin for reporting and providing the patch


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835282 13f79535-47bb-0310-9956-ffa450edef68
2018-07-06 21:10:07 +00:00
Deepak Dixit fcdfc47d0a Fixed: Framework webapp freemarkerTransform.properties has dependency on proudct component
(OFBIZ-10463)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835235 13f79535-47bb-0310-9956-ffa450edef68
2018-07-06 11:46:52 +00:00
Shi Jinghai 65905bd8d3 Reverted: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438

Forgot to revert site-conf.xsd.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835043 13f79535-47bb-0310-9956-ffa450edef68
2018-07-04 05:32:10 +00:00
Suraj Khurana 920050d685 Reverted: Empty header row should not render if list to render in file is empty because after this, search Result tables won't show first search result.
{OFBIZ-10438}

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835042 13f79535-47bb-0310-9956-ffa450edef68
2018-07-04 05:24:41 +00:00
Shi Jinghai 17d9904b83 Reverted: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834917 13f79535-47bb-0310-9956-ffa450edef68
2018-07-03 06:21:02 +00:00
Jacques Le Roux 39582de221 Improved: Factorize code logic from ‘ConfigXMLReader’
(OFBIZ-10453)

There is a lot of repetitive code in ConfigXMLReader. 
Using a functional interface as a parameter of a generic algorithm avoids those
repetitions.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834662 13f79535-47bb-0310-9956-ffa450edef68
2018-06-29 10:03:22 +00:00