[
https://issues.apache.org/jira/browse/SLING-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913719#action_12913719
]
Carsten Ziegeler commented on SLING-1778:
-----------------------------------------
I'm still not 100% convinced that a resource decorator couldn't solve the
simple use case. I wouldn't go into merging or overlaying etc. just plain
linking :)
So, if you have resources /a/b1 and /a/b2 and symlink resources:
/s/x1 -> /a/b2
/s/x2 -> /a/b1
Listing the children of /s gives you x1 and x2 - you could also have a non
symlink resource /s/x3 there
When requesting /s/x1 the resource decorator detects the symlink and returns a
resource with the path /s/x1 but forwards all other methods to the resource of
/a/b2.
This of course works only for this level, so the question is just what a list
children of /s/x1 returns or it is desired to allow deep links like
/s/x1/bla/bli/blo which is then resolved to /a/b2/bla/bli/blo.
> 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.