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

Bertrand Delacretaz commented on SLING-9662:
--------------------------------------------

Having the tests in the {{o.a.s.resourceresolver}} bundle would be natural but 
that might "pollute" the bundle code with things that are not related to its 
core functionality? I don't know if it's the case, haven't looked in detail.

My ideal situation would be to have a folder of test code that we can point to 
and say "this is where the Whole Truth about the out-of-the-box Sling URI to 
Resource mappings mechanisms is found". That can be a test folder in that 
module, or even a new module. I suppose it has to be "real" integration tests 
that use an actual Sling instance for precision and clarity.

I suppose part of that is tested in 
https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests 
but as discussed a few weeks ago I think we shouldn't add new tests to that 
module and keep it as "the set of legacy tests" that guarantee backwards 
compatibility, so if it's not in the resourceresolver bundle I'd suggest a new 
specific tests module.

> Introduce a Resource Mapping SPI
> --------------------------------
>
>                 Key: SLING-9662
>                 URL: https://issues.apache.org/jira/browse/SLING-9662
>             Project: Sling
>          Issue Type: New Feature
>          Components: API
>            Reporter: Georg Henzler
>            Assignee: Georg Henzler
>            Priority: Major
>
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> *ResourceUri:*
> General purpose class to represent a ResourceUri (like e.g. a link in an html 
> <a> tag). Immutable itself but adjustable using the builder pattern. Part of 
> the Sling API and can be used anywhere to simplify handling/modification of 
> Sling ResourceUri. Implements RequestPathInfo. ResourceUri can be created 
> easily from a String, a Request, a Resource, a URI or a RequestPathInfo.
> *ResourceToUriMapper:*
> SPI interface to be implemented as OSGi Service. All registered services 
> build a conceptual chain sorted by service ranking. The resource link is 
> passed through the chain while any ResourceToUriMapper chain member may or 
> may not make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the ResourceToUriMapper 
> with the <strong>highest</strong> service ranking and rr.map() passes through 
> the chain starting at the ResourceToUriMapper with the 
> <strong>lowest</strong> service ranking
> _Mailing List References:_
>  [https://www.mail-archive.com/[email protected]/msg93537.html] 
>  [https://www.mail-archive.com/[email protected]/msg87736.html]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to