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
(OFBIZ-10412)
UtilValidate class contains a `isEmpty` method both for `CharSequence` and for
`String` types but since the first is an interface for the other and that the
implementation are the same we don't need to keep the one for the concrete type.
Additionnaly I have removed the unused Generic type for the remaining
implementation.
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832170 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10272)
Not sure why it went unnoticed so long, but by removing README.md
(replacing README.adoc) r1827046 brokes testZipReadme
Not a big deal, we can just replace the file in the test (from README.md to
README.adoc). We could chose a more sure to remain file, but I guess that now we
are going with asciidoc and README.adoc should stay
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827457 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10281)
When you call the HttpClient on Rest API on url that return you an error, the HttpClient failed to give you the error stream:
callResult = restClient.getStream();
If the flow is an error in the catch block with the line
in = con.getInputStream();
that return a FileNotFoundException
To solve if, if the connexion is an instance of HttpURLConnection we resolve this error inputStream contains the error message
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827212 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-4959)
I used the only available (and I must say confusing) WebappInfo.getName() when
I needed the webAppName not the WebappInfoName. So this put in a new
WebappInfo.getMountPoint() and use it in getWebappInfo
Also use LoginWorker.autoLoginSet() in different places where I missed it. In
other words all autoUserLogin coockies are deleted on login and logout, and
an autoUserLogin cookie is created when going locally from a webapp to another,
with checkExternalLoginKey
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826938 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-4959)
Logout method do not disable autoLogin functionality.
Instead of that it just initializes autoLogin in session and request.
jleroux: this was also needed by OFBIZ-10206 "Security issue in Token Based
Authentication".
This creates a keep-autologin-cookie boolean attribute in the webapp element of
the ofbiz-component.xml, documented in ofbiz-component.xsd
This attribute is used to get the value from the ofbiz-component.xml files in a
new autoLogoutCleanCookies() LoginWorker method. This method is used not only
when login out but also when login in. This to be sure that in every cases the
cookies related to the webapps are removed.
For now only the ecommerce, ecomseo et webpos webapps are keeping and using
their autologin cookies
Thanks: Roberto Benítez Monje for report and Taher for discussion and suggestion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824803 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9571)
UtilNumber class
Deprecates and replaces both getBigDecimalRoundingMode() by getRoundingMode()
Deprecates toPercentString()
Puts a log for a NumberFormatException
Calculate class
Uses RoundingMode where necessary. No deprecation, this should be only used
by Minilang
The rest
Adapts the whole code for that
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823931 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10218)
While working on OFBIZ-9571 I found that getBigDecimalRoundingMode() returns
DEFAULT_BD_SCALE when the passed value for the file parameter is emtpy.
This has certainly be C/P from getBigDecimalScale() and never found before.
While at it I refactored a bit getBigDecimalRoundingMode() and
getBigDecimalScale()
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823876 13f79535-47bb-0310-9956-ffa450edef68
Add zipFileStream method that will zip FileStream to a zipped one.
Add unzipFileToFolder method to unzip a given archive to a given Folder.
Add fileUtil groovy test suite that create zip file containing README.md, then unzip it to tmp folder and compare original and unzipped files.
Thanks Jacques for the review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823567 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10133)
No functional change in trunk
Slightly improves formatting in streamContent() in trunk.
Uses the same code in R16, notably for setting
byte[] buffer = new byte[bufferSize];
that guarantee no issues, and using try-with-ressource
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821054 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10133)
When ofbiz streams a large content (eg. video file), get out of memory exception.
To reproduce the issue see the Jira
jleroux: I just removed final for bufferSize, I see no needs for that local
variable
Thanks: Wai for the patch Michael for the discussion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821036 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10159)
The method findOne() which is set in the OfbizDslDescriptorForEclipse.dsld is
wrong, since there is no implementation for this method, which only has a String
and a List as parameters. I changed it to the correct method, so it can be used
within groovy properly, also I put an implementation in the GroovyBaseScriptFile
Thanks: Dennis Balkir
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1820966 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10052)
This completes the work done so far by removing double check in cases not using
brackets, like
if (Debug.verboseOn())
if (Debug.verboseOn()) Debug.logVerbose()
Thanks: Michael for reporting this case I missed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818445 13f79535-47bb-0310-9956-ffa450edef68