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

MockJcrResourceResolverFactory should allow to register services dynamically.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Testing Sling Mock 1.1.2
    • Testing Sling Mock 1.2.0
    • Testing

    Description

      The MockJcrResourceResolverFactory class creates it's own mocked OSGi BundleContext and uses it to create a ResourceResolverFactory. Part of the OSGi environment initialization performed in the class is registering OSGi services to be available by the mocked resolver. By default there is only one service - SlingRepository.

      However, the more recent versions of ResourceProvider implementations requires other services, eg. PathMapper. Right now there is no way to inject this service into the mocked OSGi container. The MockJcrResourceResolverFactory should allow to register custom services, so it'll be compatible with the future versions of ResourceResolvers and Providers.

      Attachments

        1. SLING-4437.patch
          2 kB
          Tomek Rękawek

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tomek.rekawek Tomek Rękawek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: