>> On Fri, Mar 5, 2010 at 11:42 AM, Carsten Ziegeler <cziege...@apache.org> >> wrote: >>> ...We could make a general approach like (I couldn't make up could names >>> for the interface and methods...) >>> >>> interface ResourceProcessor { >>> >>> Resource process(Resource); >>> } >>> >>> so basically this works like kind of a filter which is able to >>> substitute a resource with a completly different one - this could be >>> used to change the resource type, the super resource type, metadata, >>> different implementations of the adaptTo method etc. Everything is >>> possible....
> On Fri, Mar 5, 2010 at 11:54 AM, Bertrand Delacretaz >> I like the idea, we could call it ResourceFilter maybe? As you >> indicate it's filtering the resource after it's loaded. >> >> It's a sharp knife though, could probably be abused in several ways - >> but as all Sling components are replaceable anyway, it doesn't make >> much of a difference. >> >> I'd say go for it, but watch out for which implementations we create ;-) On Fri, Mar 5, 2010 at 2:10 PM, Julian Sedding <jsedd...@day.com> wrote: > I like the idea and implementing this in a generic fashion seems sensible to > me. > > Regarding the naming, what about: > > interface ResourceDecoratorFilter { > Resource decorate(Resource); > } I really like this idea, I have been thinking about something similar: A ResourceDecorator which would provide dynamic property values, like a count of its child resources, or a sum of products in a shopping basket. The concept you guys come up with here looks really useful for this purpose. -- Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no Sommerrogata 13-15, N-0255 Oslo, Norway + 47 22 00 84 00 / +47 21 531941, ext 2070