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

An attribute that another attribute 'requires' should be allowed to be undefined if another attribute in the same set of 'requires' is an alternative

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.0.Beta16
    • None
    • Management
    • None

      Right now ValidateModelStepHandler checks whether all attributes a defined attribute lists in 'requires' are themselves defined. It ignore the presence of alternatives settings. However in discussion with jfdenise_jira we've concluded that allowing undefined do to any 'alternatives' isn't right either. Rather, for a 'requires' to be superceded by an 'alternatives', only alternatives that are themselves part of the same set of 'requires' are relevant.

      Imagine three scenarios:

      I.
      1) A requires B, C
      2) B and C are alternatives to each other

      User configures A and B is ok. Or, user configures A and C is ok. Configuring A, B, C is not ok.

      II.
      1) A requires B, C
      2) B and C are alternatives to each other
      3) B and D are also alternatives

      User configures A and D and therefore must configure C, but not B. Configuring C satisfies the "requires" B.

      III.
      1) A requires B, C
      2) B and C are NOT alternatives to each other
      3) B and D are alternatives

      User configures A therefore cannot configure D, must configure B and C. Configuring D does not satisfy the "requires" B.

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

                Created:
                Updated:
                Resolved: