You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by benni23 <b....@googlemail.com> on 2009/04/15 12:25:20 UTC
Implement filtering non-invasively
Hi,
I am currently trying to add a feature to the ecommerce component that
allows to restrict visibility of products by assigning customer groups
(party groups) to an associated category. I would like to do that without
changing any of the existing code. My approach was to use secas but I
discovered that I have no mean to get hold on the result of the service that
triggered my seca. Thus I can't add filtering without touching existing
code. Now I wonder if there is a different way of doing this, since I can't
imagine that there is no way of changing the result of a service without
changing framework code.
regards,
Benjamin
--
View this message in context: http://www.nabble.com/Implement-filtering-non-invasively-tp23056257p23056257.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Implement filtering non-invasively
Posted by benni23 <b....@googlemail.com>.
Hi,
I am not sure if I understand fully what you mean. If I define a service
with the same name in my custom component, how should the service engine
know which one to invoke.
I can write my own implementation and tell the service engine that it should
use my implementation instead of the existing one. But to do this, I would
need to change framework code (the service mapping) and that is what i want
to avoid. Also, I want to use the original service and add some logic
(filtering) to it and not replace it.
Currently, I have renamed the original service and mapped my custom
implementation to the original service name and call the original service
from my custom implementation and then postprocess its result. But I would
rather use something like the ECA mechanism and not change any of the
existing mappings.
regards
Jacopo Cappellato-4 wrote:
>
> On Apr 15, 2009, at 12:25 PM, benni23 wrote:
>
>> Now I wonder if there is a different way of doing this, since I can't
>> imagine that there is no way of changing the result of a service
>> without
>> changing framework code.
>
> You can re-implement (override) the service in your custom component.
>
> Jacopo
>
>
>
>
--
View this message in context: http://www.nabble.com/Implement-filtering-non-invasively-tp23056257p23099380.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Implement filtering non-invasively
Posted by Jacopo Cappellato <ja...@hotwaxmedia.com>.
On Apr 15, 2009, at 12:25 PM, benni23 wrote:
> Now I wonder if there is a different way of doing this, since I can't
> imagine that there is no way of changing the result of a service
> without
> changing framework code.
You can re-implement (override) the service in your custom component.
Jacopo