Alexander Klimetschek wrote: > On Tue, Dec 15, 2009 at 13:57, Carsten Ziegeler <[email protected]> wrote: >>> I think one should not open up resource providers (that are based on >>> JCR) to use any kind of programmatic rules. The rules should be simple >>> and easily "visible" from looking at the repository. Hence, looking at >>> the path and the resource types along it should be enough. >>> >> We already have this mechanism for jcr resources. A pluggable service >> can be implemented to return any resource type :) > > So what is the original question about?
The question is if we should make this mechanism more general and make it available for any kind of provider - which would solve my problem. > >>> For example, if no resource type could be found (well, the node type >>> is always present...), [...] >> Hmm, sorry, can you please elaborate a little bit? Usually files or >> folders have an nt:folder or nt:file resource type. > > That's what I meant with "the node type is always present". I actually > meant, if no *explicit* resource type, ie. no sling:resourceType, > could be found. Yepp - I guess I could get away with using nt:file etc and a selector for my stuff - but this would only work as long as only images and folders are stored there. If someone puts an mp3 there it would be treated as an image. With a hook I could at least check the extension (I know this is not bullet proof either, but better than nothing) > > However, I have no good idea yet, how to actually map that to > resources and resource types. ;-) > Carsten -- Carsten Ziegeler [email protected]
