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

ResourceBundleManager API

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • Extensions

    Description

      Currently there is the ResourceBundleProvider service interface, which really is an SPI, now that you can have multiple of them. The right way of accessing them is to get all service references, sort by service ranking (highest first) and then take the result from the first one that doesn't give you a null result (null resource bundle from getResourceBundle()). This is done in the I18nFilter and is quite a bit of boilerplate that client code should not have to worry about.

      Thus there should be a new API, something like a ResourceBundleManager with the 2 methods for getResourceBundle() (with basename and without).

      [1] http://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/i18n/src/main/java/org/apache/sling/i18n/impl/I18NFilter.java

      Attachments

        1. SLING-3407.patch
          22 kB
          Alexander Klimetschek

        Issue Links

          Activity

            People

              Unassigned Unassigned
              alexander.klimetschek Alexander Klimetschek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: