Uploaded image for project: 'Tamaya'
  1. Tamaya
  2. TAMAYA-128

Adding ConversionContext to converter params

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • 0.1-incubating
    • 0.2-incubating
    • API
    • None

    Description

      For passing metadata to a PropertyConverter more arguments are needed then only the simple String input value. Therefore an additional ConversionContext is passed with the following data:

      • the requested key
      • the requested target type
      • the base configuration
      • the injected field or method (optional).
      • a (mutable) list of supported formats as Strings

      The ladder also provides an elegant way to enable converters to dynamically register their supported formats, making them available for improved user feedback on the currently supported formats for a type. Nevertheless the PropertyConverter interface can stay functional.

      Unfortunately this change breaks the current PropertyConverter SPI, but extending the ConversionContext should be possible when needed in the future without breaking the API again.

      Attachments

        Issue Links

          Activity

            People

              anatole Anatole Tresch
              anatole Anatole Tresch
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: