[ 
https://issues.apache.org/jira/browse/OFBIZ-12761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nicolas Malin closed OFBIZ-12761.
---------------------------------
    Resolution: Done

I loaded it only on trunk this is an improvement.

> Multi Param Model Service Map
> -----------------------------
>
>                 Key: OFBIZ-12761
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12761
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework/service
>    Affects Versions: 22.01.01, Upcoming Branch
>            Reporter: Gaetan Chaboussie
>            Assignee: Nicolas Malin
>            Priority: Minor
>              Labels: patch
>         Attachments: MultiParamServiceMapAndTest.patch
>
>
> Hello community.
> We had a use case with the need for validation of IN params of services.
> For example we had to check that the following service definition was 
> correctly filled.
> ```xml
>     <service name="exampleService" location="component:..."
>         invoke="exampleService" transaction-timeout="7200">
>         <description> Service example use case with internal attributes to 
> validate </description>
>         <implements service="ApiJsonInterface"/>
>         <attribute name="partyId" type="String" mode="IN"/>
>         <attribute name="header" type="java.util.Map" mode="IN">
>             <attribute name="internal_code" type="String" optional="false"/>
>         </attribute>
>     </service>
> ```
> As is, the framework doesn't offer any clean way of doing this, so we 
> implemented some modification to ModelService.
> So we used TDD to develop the improvement we needed and that may prove a 
> valuable improvement for the framework.
> Using these tests, we took the opportunity to refactor outdated code using 
> java streams.
> Please see the patch attached to the ticket containing code and tests.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to