* Added verb as an attribute to specify the REST method OFBiz service is going to serve on
* Added methods to get service IN and OUT parameters as MAP
* Added TODO for supporing nested parameters
* Improvement : Added Restrictions for verb attribute and documentation for the same
* Fixed checkstyle issues
* Changed attribute name from verb to action for better clarity
(OFBIZ-7113)
As mentioned by Mathieu on dev ML uses rather a boolean than a token for
"require-new-transaction" and "return-error-on-failure"
Also some formatting while at it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866589 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7113)
With the problem to have a permission service not on the same transaction that the related service [1]
I realized the following improvement to
* unified call evalPermission
* move all related field for permission service on ModelService to ModelPermission
* Remove deprecated code
* add labelized error message
* call as same transaction the permission service by defautl with possibility to overide this rule
* add new attributes on permission model: require-new-transaction and return-error-on-failure
Thanks to Jacques Leroux for the review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1866137 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10411)
To define boolean values, some ad-hoc enumeration of "true" and "false" are
repeatedly used. Since XML Schema defines a standard boolean datatype it's
better to use it.
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846727 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10557)
Related to the discussion on dev [1] I turn off by default the indefinitely restart when a service async failed.
When a service run by async with persistence (eg: dispatcher.runAsync('returnErrorService', context, true)), the default value set on jobsandbox.maxRetry is now 0 instead of -1 before.
If you want run indefinitely an async service while isn't a success, set on your service definition max-retry='-1'.
[1] https://s.apache.org/EBhf
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840526 13f79535-47bb-0310-9956-ffa450edef68
We have enabled flag in ServiceEcaRule class, if its set false then seca rule will not be executed.
But there is not way to disable seca.
We can add enabled flag in SECA definition to disable the existing seca rule.
Here is the proposal:
- Add new attribute on seca tag named enabled
- Default value will be true for this.
- If user want to disable existing OOTB seca rule, then user can define same rule in custom component and set the enabled=false
Need to do some changes in code to honor the enabled attribute while loading seca rule.
Also as per current flow if same seca rule is define more then once, system will execute all the rule, ideally it should not execute same rule (same rule, condition and action) if its defined more than one.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812394 13f79535-47bb-0310-9956-ffa450edef68
When you want to remove a service we add a new xml element <deprecated/> that you can put on the service definition like this
<service name="oldService" ...>
<deprecated use-instead="newService" since="theReleaseXXX">The reason to move it as deprecated</deprecated>
<implements service="newService"/>
</service>
A deprecated service generate a warning log each time it is called
When you navigate on webtools a deprecated service is strike in the service list and display deprecated reason on the service definition detail page.
Thanks to Scott, Deepak, Taher and Jacques for sharing on this subject
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804786 13f79535-47bb-0310-9956-ffa450edef68
After r751990, <<allow-html="any">> and <<allow-html="safe">> are the same: they do nothing! The only difference is the warning message from the OWASP Antisamy IntrusionDetector, which is both, as Christoph noted "giving you a false sense of security" or as I wrote "disturbing, wrong and useless". So there are no longer any reasons for differencing "safe" and "any".
This
* Deprecates "safe" (making it clear in the XSD documentation), keeping only "none" and "any". This is for backward compatibility, else we could completely remove the misleading "safe". Note that "none" is the default.
* Replaces in services definition all allow-html="safe" by allow-html="any"
* Remove from ModelService.java (near line 587) the code which throws the OWASP Antisamy IntrusionDetector message in log
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1536324 13f79535-47bb-0310-9956-ffa450edef68
1. Gave the job queue a fixed size so the job poller can't create an out-of-memory condition.
2. Changed min/max thread settings to more conservative values.
3. Changed JobSandbox polling code to accept a limit argument to control the number of records retrieved. Also used ELI to limit memory use.
4. Improved JobManager reloadCrashedJobs method to recover queued jobs that were being missed previously.
At this stage the Job Scheduler has been fixed to not crash/saturate the server, but it can still lose jobs. That will be fixed in the next commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1370437 13f79535-47bb-0310-9956-ffa450edef68
A hideResultInLog service attribute is added. If set to true the service result will be hidden from possible exposition in ServiceDispatcher.runSync()
This is convenient when used for sending a password to an user (the password must be legible in the sent mail).
I'm sure a lot of you would want to have no logs at all in production. But by experience I know that we need to log info in logs even in production. Especially when the system is quickly moving ahead...
So this is a sure mean to hide any password in logs, being current or backuped somewhere on the servers disks...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1328122 13f79535-47bb-0310-9956-ffa450edef68
A patch from Nicolas Malin - adding a generic service to call xml-rpc server. The goal is to have a technical interface to make calls directly from mini-lang.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@959071 13f79535-47bb-0310-9956-ffa450edef68
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)
Of course this effort to remove trailing spaces has no functional implications.
Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {
So these changes are also in this commit, should not be a problem anyway.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
None - Does no locking
Wait - Waits for the previous service to complete (currently up to 5 minutes)
Fail - Fails when the same service is already running
use the semaphore="none|wait|fail" in the service definition (none is the default when the attribute is not defined)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@575074 13f79535-47bb-0310-9956-ffa450edef68