You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Seifert (JIRA)" <ji...@apache.org> on 2013/07/04 19:15:48 UTC

[jira] [Updated] (SLING-1778) Symlinks

     [ https://issues.apache.org/jira/browse/SLING-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Seifert updated SLING-1778:
----------------------------------

    Attachment: 130704_symlinks-0.0.4.patch

it passed some time since the last update on this ticket...
thanks julian for this initial patch proposal, good work.

we had a requirement within our project to implement exactly such behavior to mirror some hundred sites with a lot of pages/nodes without really copying them in the JCR, but with allowing some small overlays of single nodes. exactly what was provided by the patch.

when working with the patch we detected some fixes, optimizations and enhancements are required, attached is a new patch:
[^130704_symlinks-0.0.4.patch]

the relevant changes where:
* prefix all properties with symlink, add symlinkRegisterParent property
* use sling api instead of JCR api where possible
* detect invalid symlink definitions
* refactor overlay implementation
* fixed resource handling in Wrapper objects
* "cache" toString method call execution as optimization
* added configuration to enable/disable symlink functionality
* add public access to registered providers and their configurations
* change provider map to concurrent hash map

there are probably still some issues left that where not relevant for our usecases. still the current code seems to be quite stable, we're using it in production.

i would be glad if the initial patch and our contributions can make it into the extensions section of the sling project to get a wider audience if others are interested as well.
                
> 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