sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-7792) Resource Resolver should return more than one resolved path if available
Date Thu, 02 Aug 2018 06:47:00 GMT

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

Carsten Ziegeler commented on SLING-7792:
-----------------------------------------

Thanks [~rombert], I think the api for the mapping service itself looks good. If a couple
of comments
- in the javadocs it's better to reference the full qualified service if it's in another package,
this way there is no "import" statement between the packages required
- the current ResourceResolver.map() method is bound to the resource resolver and therefore
to a user, which means different users might get different results. The new service does not
have the notation of a user, so I assume we'll use a service user which then means that the
results might be different
- as the map() method is frequently used and due to the above reason (bound to a user), I
don't think we should deprecate it


> 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: API, ResourceResolver
>    Affects Versions: Resource Resolver 1.6.0
>            Reporter: Alex COLLIGNON
>            Priority: Major
>             Fix For: Resource Resolver 1.6.6
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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)

Mime
View raw message