Hi,
I am trying to override the service that displays products in the various categories. I need to change what data is returned, prior to the rendering thereof. org.ofbiz.product.category.CategoryServices.getCategoryMembers(......), seemed like the correct service to override, but the overriding thereof has had no effect. Any help would be appreciated. Kind regards Grant Edwards |
Administrator
|
Maybe I did not understand your question, but here we go :
OFBiz uses a Service Oriented Architecture (SOA). It does not use (only) Plain Old Java Object (POJO). In your case you must understand that org.ofbiz.product.category.CategoryServices.getCategoryMembers(......), is used by the service getProductCategoryMembers (in applications/product/servicedef/services_view.xml) and overriding getCategoryMembers can't have no effect in this service. Please have a look at the documentation http://docs.ofbiz.org/display/OFBADMIN/Apache+OFBiz+Getting+Started http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index Jacques From: "Grant Edwards" <[hidden email]> > Hi, > > I am trying to override the service that displays products in the various categories. I need to change what data is returned, > prior to the rendering thereof. org.ofbiz.product.category.CategoryServices.getCategoryMembers(......), seemed like the correct > service to override, but the overriding thereof has had no effect. > > Any help would be appreciated. > > Kind regards > > Grant Edwards > |
Jacques, thank for the reply.
I do understand the architecture used by OFBiz, by all accounts my question might not have been very clear. I am attempting to override the getCategoryMembers(.....), in a hot-deploy component that I am writing, take a look at the service definition below: <service name="getProductCategoryMembers" engine="java" location="com.gat.search.services.CategoryServices" invoke="getCategoryMembers"> <description>Gets ProductCategoryMembers for the category_id</description> <attribute name="categoryId" type="String" mode="IN"/> <attribute name="category" type="org.ofbiz.entity.GenericValue" mode="OUT"/> <attribute name="categoryMembers" type="java.util.Collection" mode="OUT"/> </service> Within my version of com.gat.search.services.CategoryServices I am replacing/overriding the functionality provided by the service getProductCategoryMembers. This has all worked fine, and within https://localhost:8443/webtools/control/availableServices I can see my new service. https://localhost:8443/webtools/control/availableServices?constraint=location@... Now getting back to my original question. I need to change what products are displayed for any given category. I had assumed that replacing/overriding the service called getProductCategoryMembers would enable me to do this, but unfortunately I am still seeing the original list of products displayed in the category in question. Is getProductCategoryMembers the correct service to replace/override in order to change what products are displayed for a given category ? Kind regards Grant Edwards Jacques Le Roux wrote: > Maybe I did not understand your question, but here we go : > OFBiz uses a Service Oriented Architecture (SOA). It does not use > (only) Plain Old Java Object (POJO). In your case you must understand > that > org.ofbiz.product.category.CategoryServices.getCategoryMembers(......), > is used by the service getProductCategoryMembers (in > applications/product/servicedef/services_view.xml) and overriding > getCategoryMembers can't have no effect in this service. > > Please have a look at the documentation > http://docs.ofbiz.org/display/OFBADMIN/Apache+OFBiz+Getting+Started > http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Documentation+Index > > Jacques > > From: "Grant Edwards" <[hidden email]> >> Hi, >> >> I am trying to override the service that displays products in the >> various categories. I need to change what data is returned, >> prior to the rendering thereof. >> org.ofbiz.product.category.CategoryServices.getCategoryMembers(......), >> seemed like the correct >> service to override, but the overriding thereof has had no effect. >> >> Any help would be appreciated. >> >> Kind regards >> >> Grant Edwards >> > > |
In reply to this post by Grant Edwards-2
Hi Grant,
I think the service you are looking for is getProductCategoryAndLimitedMembers Bilgin |
Thanks Bilgin, that exactly what I was looking for.
Bilgin Ibryam wrote: > Hi Grant, > > I think the service you are looking for is > getProductCategoryAndLimitedMembers > > Bilgin > |
Free forum by Nabble | Edit this page |