Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-9

Transformers chained for versions

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 1.0.0.Alpha4
    • None
    • Management
    • None

    Description

      Say you have a subsystem with model versions 1.0, 1.1 and currently 2.0.

      At present we register a transformer doing everything that needs doing from 2.0 to 1.1, and another one duplicating all that with everything that needs doing from 1.1 to 1.0. As more model versions are added, more transformers 'doing everything' are needed.

      Richard and Tomaz have both come up with the same idea, to avoid this code duplication by only having transformers for each model version increment, and to chain them together, so you would have

      • a transformer for 2.0 to 1.1
      • a transformer for 1.1 to 1.0

      Then if someone wanted to transform from 2.0 to 1.0 we would take the current model/operation and feed that into the 2.0-to-1.1 transformer, giving us the 1.1 model/operation. The 1.1 model/operation would then be fed into the 1.1-to-1.0 transformer giving us the 1.0 model/operation.

      Attachments

        Activity

          People

            kkhan1@redhat.com Kabir Khan
            kkhan1@redhat.com Kabir Khan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: