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

Make it possible to propagate attachments from the operation context to the transformer context

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0.Alpha1
    • None
    • Management
    • None

      The transformation context needs attachments, and the operation context attachments should be propagable to the transformation context so that the write attribute handlers can give signals to the transformers. We don't want to propagate everything, so I have created TransformerOperationAttachment which in turn contains attach() methods. Only attachments added there get propagated.

      One use case is if the old model used child resources, so it has child=1, child=2. If the new model was refactored to use this as a map attribute on the parent resource, when the attribute is overwritten, the transformer needs to create a composite to add what is new, remove what is missing, and update things which were changed. However, this is not known to the transformer. So the idea is that the write attribute handler can use these attachments to signal the transformer about what has been added and removed by comparing the new and old values.

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

                Created:
                Updated:
                Resolved: