ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Agarwal <dagarwa...@gmail.com>
Subject How to extend a service with a base method defined in parent service
Date Thu, 21 Mar 2013 07:07:16 GMT
Hello,

I have a requirement where I want to keep common 'operations' (not
attributes) in one service and then want to extend it with several
services. Here, I want that while running child services base service
method gets run first (just in a normal polymorphism concept).

Is it possible to define these services in services.xml OOTB ?

In my knowledge so far services defined in the services.xml can
inherit/override the attributes but the following doesn't work

<service name="ParentService" engine="groovy"
location="component://mycomp/webapp/mycomp/WEB-INF/action/folder/Parent.groovy"></service>

<service name="ChildService" engine="groovy"
location="component://mycomp/webapp/mycomp/WEB-INF/action/folder/Child.groovy">
   <implements service="ParentService"/>
</service>

Or, probably only 'implements' is supported and hence only interfaces can
be implemented and no support for extending services.

-- 
Thanks,
Deepak Agarwal,

Mobile: +91 9501190044

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