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

Stefan Seifert commented on SLING-1778:
---------------------------------------

this symlinks feature is implemented within the sling resource resolver 
infrastructure and can be applied to any resources, not only to JCR resources.
the symlink concept is related but not similar to the shared node concept in 
JCR. the major differences are:
* for JCR shared nodes there is no "master node", but a node can have multiple 
parents which have "equal rights". the symlink concept always has a master tree 
which is referenced by the symlink nodes. this usually matches better to a 
scenario where a dedicated team of editors is responsible for maintaining the 
master tree, while others are responsible only for the inherited tree and are 
not allowed to touch the master tree.
* it is not possible to do things like "overlays" for some subtrees with JCR 
shared nodes, it is always exactly the same subtree that is linked to multiple 
parents. this is possible with this symlink patch (although it has some 
limitations, e.g. no control about the ordering of nodes that are added only in 
a inherited subtree)
* the JCR specification leaves open several details for the implementation of 
the JCR repository, e.g. how to handle observation, JCR queries etc. 
Additionally the shared nodes feature seems to be rarely used and is not 
supported by all JCR-based CMS systems (e.g. Adobe CQ)
                
> 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: 130704_symlinks-0.0.4.patch, 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to