ofbiz-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rishi Solanki <rishisolan...@gmail.com>
Subject Re: Usage of setServiceFields method in ServiceUtil.java file.
Date Sat, 22 Jul 2017 14:22:40 GMT
I think, what Ujjawal wants to propose is where ever applicable we should
use ServiceUtil.setServiceFields() method to prepare the service context to
call the service.

Also I look at the other proposal by Deepak to use makeValidContext() of
DispatchContext, but I cross check the service util method proposed by
Ujjawal internally call the same.

So I think, where applicable we should use the ServiceUtil method proposed
by Ujjawal. It will surely reduce the code lines if we use this utility
method.

Big +1 on the caution mentioned by Deepak to use it correctly with extra
care.



Rishi Solanki
Sr Manager, Enterprise Software Development
HotWax Systems Pvt. Ltd.
Direct: +91-9893287847
http://www.hotwaxsystems.com

On Sat, Jul 22, 2017 at 6:28 PM, Deepak Dixit <
deepak.dixit@hotwaxsystems.com> wrote:

> I think Ujjawal is proposing to use ServiceUtil.setServiceFields method to
> prepare service in context.
> Instead of creating map and set values hardcoded,
>
> I think instead of using setServiceField we can use makeValidContext()
> of DispatchContext
> class file.
> And be clear while using these method as it set all the service in param in
> context, either you want to set it or not.
> Need to make sure that we use it correctly.
>
>
>
>
>
>
> Thanks & Regards
> --
> Deepak Dixit
> www.hotwaxsystems.com
> www.hotwax.co
>
> On Sat, Jul 22, 2017 at 6:16 PM, Taher Alkhateeb <
> slidingfilaments@gmail.com
> > wrote:
>
> > Hi Ujjawal,
> >
> > Sorry maybe I lost track, but what are you recommending?
> >
> > On Sat, Jul 22, 2017 at 3:26 PM, Ujjawal Solanki
> > <ujjawal.solanki@hotwaxsystems.com> wrote:
> > > Hello all,
> > > I was going through ServiceUtil.java and found that there is a method
> > > called setServiceFields ( whose purpose is to take in in parameter of a
> > > service and returns the out parameter using modalService ) which can be
> > > used in many other part of code as there are many instance ( code
> blocks
> > )
> > > where same code is written as in this setServiceFields method.
> > >
> > > Just for example if we see the compDocService.java file, we have same
> > code
> > > for modelService as present in the setServiceFields. So i think we can
> > make
> > > use of setServiceFields in such cases.
> > >
> > > Please share your opinion on the same.
> > >
> > > Thanks & Regards,
> > > *Ujjawal Solanki*
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message