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

Karl Pauls commented on SLING-8411:
-----------------------------------

[~jsedding], sure - however, it sounds like you already parsed the main idea 
out of the description namely, to be able to deal with situations where it is 
inconvenient to not be able to adaptTo Node :).

Granted, it is a little broader than that as existing code often doesn't even 
get to that point but rather, uses Session as soon as possible (not to mention 
queries, etc). I wouldn't assume it is going to be a very popular use case nor 
is it intended as a replacement for a resource provider. Alas, if you have 
existing code (maybe outside of your control or just too much to change) that 
requires the api this approach can be a way to make it work with custom 
resources in the tree.

That said, the change isn't major as long as you don't provide a mount. For 
that part, we are talking about some 20 LOC that are added. The rest is needed 
for when you do - but it isn't a lot of functionality but rather dumb objects.

At any rate, I added some tests to the PR to cover at least the basic use case.

> Provide a way to bifurcat a repository path to a provider mount
> ---------------------------------------------------------------
>
>                 Key: SLING-8411
>                 URL: https://issues.apache.org/jira/browse/SLING-8411
>             Project: Sling
>          Issue Type: Improvement
>          Components: JCR
>    Affects Versions: JCR Base 3.0.6
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>            Priority: Major
>             Fix For: JCR Base 3.0.8
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> While one would normally use a resource provider to extend the content tree, 
> sometimes, that can be not enough a code might make assumptions about the 
> resources being actually being backed by JCR. This can be problematic as for 
> example, a given resource can not necessarily be adapted to a Node nor be 
> found via a Session.
> Hence, a similar approach on the JCR level allowing developers to mount 
> content into sub trees of the repository itself can be helpful to be able to 
> support these kind of usecase. We should provide a hook for a repository 
> mount that takes over a given subpath by wrapping repositories returned by 
> the base and dispatching to the mount when the request is for a given subpath.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to