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

Simplification of setCapabilityReference where resource only exposes a single capability.

    XMLWordPrintable

Details

    Description

      Currently we need to use the following method to specify that one of our attributes is a reference to another capability: -

          public BUILDER setCapabilityReference(String referencedCapability, String dependentCapability, boolean dynamicDependent) {
              referenceRecorder = new CapabilityReferenceRecorder.DefaultCapabilityReferenceRecorder(referencedCapability, dependentCapability, dynamicDependent);
              return (BUILDER) this;
          }
      

      However the resource has already indicated the capability it provides and indicated whether it is dynamic so the last two parameters duplicate this information.

      This makes it much harder to re-use attribute definitions across different resources as even though they may reference the same time they now contain information about the resource they are used within.

      As discussed previously there is still the case that a single resource could provide multiple capabilities and this additional information may be required to clarify which capability it is in relation to but in general if a resource only provides a single capability we should be able to detect that without the additional information on the attribute.

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            darran.lofthouse@redhat.com Darran Lofthouse
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: