[ 
https://issues.apache.org/jira/browse/SLING-7792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu reopened SLING-7792:
------------------------------------

Reopening, seems I did not preserve some backwards compatibility scenarios

{noformat}[ERROR] Tests run: 62, Failures: 2, Errors: 0, Skipped: 0, Time 
elapsed: 37.627 s <<< FAILURE! - in 
org.apache.sling.launchpad.webapp.integrationtest.resourceresolver.ResourceResolverGeneralTest
[ERROR] 
testMapResourceAliasJcrContent(org.apache.sling.launchpad.webapp.integrationtest.resourceresolver.ResourceResolverGeneralTest)
  Time elapsed: 0.591 s  <<< FAILURE!
org.junit.ComparisonFailure: expected:</[testAlias/]_jcr_content> but 
was:</[]_jcr_content>
        at 
org.apache.sling.launchpad.webapp.integrationtest.resourceresolver.ResourceResolverGeneralTest.testMapResourceAliasJcrContent(ResourceResolverGeneralTest.java:2360)

[ERROR] 
testMapResourceAlias(org.apache.sling.launchpad.webapp.integrationtest.resourceresolver.ResourceResolverGeneralTest)
  Time elapsed: 0.661 s  <<< FAILURE!
org.junit.ComparisonFailure: expected:</[testAlias/]child> but was:</[]child>
        at 
org.apache.sling.launchpad.webapp.integrationtest.resourceresolver.ResourceResolverGeneralTest.testMapResourceAlias(ResourceResolverGeneralTest.java:2334)
{noformat}

> 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
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: API 2.18.4, Resource Resolver 1.6.6
>
>          Time Spent: 1h 50m
>  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)

Reply via email to