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

Adding ConversionContext to converter params

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Implemented
    • Affects Version/s: 0.1-incubating
    • Fix Version/s: 0.2-incubating
    • Component/s: API
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: