[
https://issues.apache.org/jira/browse/SLING-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12912885#action_12912885
]
Andreas Fluegge commented on SLING-1778:
----------------------------------------
Here my naive two cent to this topic:
Why not simply extending the existing JcrResourceResolver to make it
recognizing sling:symlink (or so) node types and make it return the referenced
resource instead of the requested resource. This way there is no confusion in
what this feature does: using a resource at one location as a 'placeholder' for
a resource at some other location. Here some use cases where this feature
would come in quite handy:
1. Site Navigation: Creating views to the content tailored to requirements of
certain groups of users. These views are comparable to database views with the
exception that they are static: a subtree contains only sling:symlink nodes to
build up the 'view'...
2. Reducing redundancy by reusing existing resources in a different context.
> 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.