Am Mittwoch, den 06.02.2008, 09:54 +0100 schrieb Tobias Bocanegra:
> > I would like to propose to create a ResourceWrapper class in the Sling
> > API, which is just a simple wrapper around a delegatee resource
> > analogous to what we have for servlet requests and responses. This
> > simplifies the creation of pseudo-resources, for example to create
> > resource based on another resource but with a different resource type.
> great.
> 
> > Second, I propose to move the SyntheticResource class from the
> > jcr/resource project to the Sling API because this class is by now way
> > related to a JCR repository. Rather it is very usefull in general
> > projects.
> could the synthetic resource be more intelligent? i would be very convenient
>  if it could adapt to node (if the node at the path exists.)

If you would want to just overwrite the resource type with a synthetic
resource, I suggest to use a ResourceWrapper overwriting the
getResourceType() method. Thus you get the resource type you want but
still get the node underlying the actual resource.

Regards
Felix

> 
> i suggest a: ResourceResolver.createSynthetic(String path, String 
> resorceType);
> 
> regards, toby

Reply via email to