(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
OFBIZ-10438
The request-map element has a new method attribute to control a uri be called by GET or POST or all.
Thanks: Mathieu Lirzin for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834389 13f79535-47bb-0310-9956-ffa450edef68
authentication
(OFBIZ-10307)
This reverts the work done previously for OFBIZ-9833 and OFBIZ-10206
Most parts of it will actually be reused later in a patch. By reverting it will
allow to provide a patch for others to review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1833510 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10413)
`CommonEvents::setFollowerPage` contains two unused variable definitions.
After basic search I found that this request handler is used only in
`webapp/partymgr/controller.xml`
However I was unable to understand its purpose, so I have added a comment to add
some kind of docstring.
jleroux: this event method is never used because the pushPage request map is
also never used. So we can get rid of the whole.
At the same time, fixes a typo in comment an remove an useless import
Thanks: Mathieu Lirzin for initial reporting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1833505 13f79535-47bb-0310-9956-ffa450edef68
<field><check disabled=true/></field>
and default value for attribute will be false.
(OFBIZ-10367)
Thanks Pawan Verma for reporting the improvement and providing patch for that.
Thanks James Yong for testing the work.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1833231 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10389)
Execution of the first visit events depends on the trackVisit function
In RequestHandler.java file
if (this.trackVisit(request) && session.getAttribute("_FIRST_VISIT_EVENTS_") == null) {
// execute first visit event
}
trackVisit function does not honor the default controller request
(in this case, cms) So, we should improve the code of trackVisit to honor
default controller request.
Thanks: Swapnil M Mane
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832944 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10420)
Prevents the session fixation by making Tomcat generate a new jsessionId
(ultimately put in cookie). Only do when really signing in to avoid unnecessary
calls
This improves the way it's done by using request.changeSessionId() instead of
creating a brand new session. So there is no possible side effects on client and
no need to set initial request info (using setInitialRequestInfo)
Thanks: Taher for asking about it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832756 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10420)
Fixes a session fixation security issue discovered by a client with the security
audit tool "IBM Security AppScan Enterprise , Version : 9.0.3.7"
Prevents the session fixation by making Tomcat generate a new jsessionId
(ultimately put in cookie).
Only do when really signing in to avoid unnecessary calls
Though if the client has disabled the use of cookies, then a session will be
new on each request, not a good choice on client side!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832662 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10390)
No functional changes while working on EntitySync-manual.adoc and checking the
opportunity of existing debug log (it's a bit verbose, but it's OK as is)
Simply uses a multi-catch where possible
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832411 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7598)
If list inside form doesn't contain data, then header row should not render from
better UI perspective and proper message should be shown to user.
Get to catalog/control/EditProductGoodIdentifications with eg
productId=ID:GZ-1006 for a test
Thanks: Suraj
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832401 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9846)
Replaced inline js from renderFormClose macro to external js in OfbizUtils.js
Done following:
Used custom data attributes: data-focus-field to define focus field for the form.
Used attribute selector to find elements and set focus on the particular field.
Added "requireValidation" class to all the forms with required fields.
Used the class selector to find such forms & attached Validator plugin to it.
Steps to verify:
At add ProdCatalog page: https://localhost:8443/catalog/control/EditProdCatalog
Dialogs:
New Example dialog on Find Example page
Go to Find Example page https://localhost:8443/example/control/FindExample
Click on New Example button
Validations should work in dialog on form submit.
Additional Changes:
Link for dialog in HtmlMenuMacroLibrary still had the inline code.
Replaced the code with external js code.
Validations on forms rendered with renderSubmitField macro from
HtmlFormMacroLibrary.ftl seems not working
https://demo-trunk.ofbiz.apache.org/partymgr/control/NewEmployee, will create
a separate ticket for it.
jleroux:
I agree about NewEmployee issue
As mentionned Aditya themes/rainbowstone/template/HtmlMenuMacroLibrary.ftl was
redundant, removed
I also removed commented out code in rainbowstone HtmlMenuMacroLibrary.ftl
(left by Aditya while working on the issue I guess)
Thanks: Aditya
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832307 13f79535-47bb-0310-9956-ffa450edef68