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