Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-7792

Resource Resolver should return more than one resolved path if available

    XMLWordPrintableJSON

Details

    Description

      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

      @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)

      Attachments

        1. console.png
          21 kB
          Robert Munteanu

        Issue Links

          Activity

            People

              rombert Robert Munteanu
              acollign Alex Collignon
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h
                  2h