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

Robert Munteanu commented on SLING-7792:
----------------------------------------

As this is based on an offline discussion between myself, [~acollign] and 
[~cziegeler], I'll add some more details.

The background is that for a given resource client code needs to know all 
possible variations so that they are added as requirements for an 
authentication handler. In case multiple mappings are found, e.g. the page has 
an alias but there are also matching entries under {{/etc/map}} the current 
{{ResourceResolver#map}} is not enough, as it only returns one entry.

> Resource Resolver should return more than one resolved path if available
> ------------------------------------------------------------------------
>
>                 Key: SLING-7792
>                 URL: https://issues.apache.org/jira/browse/SLING-7792
>             Project: Sling
>          Issue Type: Bug
>          Components: ResourceResolver
>    Affects Versions: Resource Resolver 1.6.0
>            Reporter: Alex COLLIGNON
>            Priority: Major
>
> The current {{ResourceResolver#map}} methods return a single "path mapped 
> from the (resource) path". However, it is possible than a given path can be 
> mapped to multiple others while using features such as {{sling:alias}} and 
> {{sling:vanityUrl}}.
> In order to support that scenario, it is require to implement new maps method 
> for {{ResourceResolver}} which returns a collection of "resolved path". This 
> collection must contain the resources mapped through {{/etc/map}}, 
> {{sling:alias}} and {{sling:vanityUrl}}.
> The current API suggests to implement a second method to be 
> consistent/symmetric with the existing map operations
> {quote}
> @Nonnull java.util.Collection<java.lang.String> maps(@Nonnull 
> java.lang.String resourcePath)
> @Nonnull java.util.Collection<java.lang.String> maps(@Nonnull 
> javax.servlet.http.HttpServletRequest request, @Nonnull java.lang.String 
> resourcePath)
> {quote}



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

Reply via email to