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

Georg Henzler commented on SLING-9662:
--------------------------------------

See 
[https://github.com/apache/sling-org-apache-sling-api/compare/feature/SLING-9662-Introduce-SlingUri-Mapping-SPI-v3]
 for the current draft version:
 * API: 
[PathToUriMappingService|https://github.com/apache/sling-org-apache-sling-api/blob/364ffe3ef4ced4267f112c8639e8ce5ab81e8b46/src/main/java/org/apache/sling/api/resource/mapping/PathToUriMappingService.java]
 (can be used instead of rr.map() and rr.resolve(), the idea is to change the 
implementation of those rr methods to use this service (and to gradually move 
the mapping functionality to the impl of this service)
 * SPI: 
[SlingUriMapper|https://github.com/apache/sling-org-apache-sling-api/blob/364ffe3ef4ced4267f112c8639e8ce5ab81e8b46/src/main/java/org/apache/sling/spi/urimapping/SlingUriMapper.java]
 (moved to SPI package). The context 
[MappingChainContext|https://github.com/apache/sling-org-apache-sling-api/blob/364ffe3ef4ced4267f112c8639e8ce5ab81e8b46/src/main/java/org/apache/sling/spi/urimapping/MappingChainContext.java]
 does provide a read-only resource resolver (but not the rr of the request to 
allow to move resolve() before authentication to fix the problems we have today 
as mentioned by [~cziegeler] above)

> Introduce an URI 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
>
> _an earlier version used the terms ResourceUri/ResourceToUriMapper (updated 
> this description during the discussion)_ 
> Introduce a simple SPI that allows to contribute to the resource resolver's 
> map() and resolve() methods:
> Prerequisite *SlingUri:* (SLING-9745 to be completed first)
> 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.
> *SlingUriMapper:*
> 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 SlingUriMapper chain member may or may not 
> make adjustments to the resource link.
>  rr.resolve() passes through the chain starting at the SlingUriMapper with 
> the <strong>highest</strong> service ranking and rr.map() passes through the 
> chain starting at the SlingUriMapper 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