[ 
https://issues.apache.org/jira/browse/SLING-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910179#action_12910179
 ] 

Julian Sedding commented on SLING-1778:
---------------------------------------

Thanks for the feedback so far!

@Bertrand
> Seems like this could be very confusing...if you really need it, I'd suggest 
> making it configurable and turned off by default. 
It is configurable via the sling:overlayable boolean property and the default, 
i.e. if the property is missing, is off.


@Felix
> * As for the symlink query: I would look for sling:symlinkTarget properties
agreed

> * sling:overlayable: I understand the concept, but: can we come up with a 
> nicer name ? ;-) 
Please feel free to suggest something more intuitive ;)

> * The ResourceResolver field of the SymlinkManager should be private. Access 
> to the field for the SymlinkResourceProvider
>      should be possible using a getter method 
Yes, that should be private. I think it is not used by SymlinkResourceProvider 
at all.

>  * SymlinkResourceProvider.listChildren should probably support non-Symlink 
> resources, particularly if the symlink overlay is
>      enabled 
Yes, I was thinking about this. I don't think it's trivial, as the 
ResourceResolver might go into a recursion. That's the reason I'm using the JCR 
API in places. An option might be to directly query other ResourceProviders.

> * As a convenience it would be usefull to add the rootPath to the 
> service.description property of the provider service registration
Purely for information? Yes, makes sense. A web console plugin might also be 
useful. I was also playing with the thought of exposing SymlinkManager as a 
service and provide an API to e.g. list registered symlinks.

> * Not sure here: Would it make sense to have the sling:SymlinkResource type 
> also extend sling:Resource ?
Not sure either, probably won't hurt. What's the use of slingResource btw?

> * How is the symlink resource accessible ? 
I used CRXDE lite for testing, which works via the Jackrabbit davx servlet. 
Therefore I don't know. Is the POST servlet purely JCR based? If that's the 
case, at least modifications would be possible. It seems, however, that a 
solution is needed to also view the symlink definition. Ideas welcome :)

> ... one more thing: for us to be able to use this contribution you should 
> upload it with the "Grant license to ASF for inclusion in ASF works" button 
> checked. Thanks. 
That's a mistake, I meant to check this of course.


@Justin
I agree that shareable nodes could be an alternative way to explore this. 
However, the use-case I need to cover is creating a language tree in a WCM 
scenario, which can be gradually overlayed with translated pages. So the "with 
exception of overlayable" would have hurt.

> Symlinks
> --------
>
>                 Key: SLING-1778
>                 URL: https://issues.apache.org/jira/browse/SLING-1778
>             Project: Sling
>          Issue Type: New Feature
>          Components: JCR
>            Reporter: Julian Sedding
>         Attachments: symlinks.patch
>
>
> I have implemented a ResourceProvider, which allows to create symlink nodes 
> in the JCR repository. A symlink node has a sling:symlinkTarget property, 
> which should contain a valid JCR path. JCR content from the 
> sling:symlinkTarget path is then exposed below the symlink node.
> There is a mixin node type, sling:Symlink with a mandatory property 
> sling:symlinkTarget and an optional property sling:overlayable. Additionally, 
> there is a convenience node type, sling:SymlinkResource, which extends from 
> sling:symlinkTarget and nt:unstructured.
> ResourceProvider instances are registered for existing symlinks when the 
> bundle is started. Modifications are taken care of via JCR observation.
> To get started:
> * apply the attached patch to a trunk checkout
> * build and install the bundle 
> * create a symlink node, pointing to some existing content
> * access the symlink node e.g. via a browser

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to