Uploaded image for project: 'Labs (Retired)'
  1. Labs (Retired)
  2. LABS-353

[beans] Make converters property aware

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Current
    • Current
    • Magma
    • None

    Description

      Converters were born to be unaware that they are working on a specific property, and this is fine.

      However, with LABS-351, now converters have a new role in the system, that is not only to convert from one type to String, but also to convert it from some intermediate "meta-types" to some generic final types, like byte[] or streams. While the to-from String conversion can easily be handled without knowledge of any other context, other conversions are not as simple.

      Moreover, such converters could assolve another function, that is to "prepare" the data as required by the user. For example, issue LABS-213 is about having forbidden elements in a rich text HTML be removed from the HTML during the conversion phase. Another example could be the image converter to resize images to conform to requirements, or to convert them to different mime types than the one uploaded by the user.

      To do this, some converters requires access to the PropertyInfo object, where validation and other informations are present.

      As a rule however, converters must keep working when they are used not in the context of a property.

      Attachments

        Activity

          People

            s.gianni Simone Gianni
            s.gianni Simone Gianni
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: