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

Transformer ValueConverter utilities for complex attributes

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • None
    • None
    • Management
    • None

    Description

      As we start to have more complex attributes in our model, we need better facilities for doing transformer work with the internals of those attributes, rather than just with the top level attribute.

      For rejects we have a decent start with RejectAttributeChecker.ListRejectAttributeChecker and RejectAttributeChecker.ObjectFieldsRejectAttributeChecker. Maybe that is all that is needed. For discards, I don't think there is anything to do, or at least not as a priority, as discards are about the kernel deciding to toss the attribute as a whole. (Perhaps for some case would want to toss an entire attribute based on a value of a field, but that seems like a real edge case.)

      Where we are lacking is with AttributeConverters. For a complex attribute, a AttributeConverter could do something much like what a discard does – remove a new field if it is set to some value that the legacy slave would do without configuration. (See WFCORE-3260 for why this kind of removal is important.)

      We should have

      AttributeConverter.ListAttributeConverter – takes an AttributeConverter as a constructor param and applies it to elements, removing elements if the converter returns an undefined node.

      AttributeConverter.ObjectFieldsConverter – takes a Map<AD, AttributeConverter> as a constructor param and for each item in the map applies the converter to the corresponding field value, removing the field altogether if the converter returns an undefined node.

      AttributeConverter.ObjectFieldsDiscarder – takes a Map<AD, DiscardAttributeChecker> as a constructor param and for each item in the map applies the discard checker to the corresponding field value, removing the field altogether if the discarder says its discardable.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bstansbe@redhat.com Brian Stansberry
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: