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

Carsten Ziegeler commented on SLING-9662:
-----------------------------------------

[~henzlerg] What is the idea to integrate the existing mapping functionality? 
Will that be wrapped by a ResourceToUriMapper that is always there?
I think one of todays problems (that we also see in the issues mentioned by 
Robert) is that we tied resolve/map to a resource resolver. In hindsight it 
would have been better to have resolve() as a separate operation which is run 
as a first step, even before authentication. I'm wondering if this SPI can 
provide a path to such a change?

> 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/dev@sling.apache.org/msg93537.html] 
>  [https://www.mail-archive.com/dev@sling.apache.org/msg87736.html]



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

Reply via email to