Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-5695

Design of configuration for modelListeners is faulty: Need to support namespaces as well as multiple paths and segmented paths

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Data Binder
    • Labels:
      None

      Description

      The declarative ChangeApplier API supplies no scheme for listening to multiple paths with a single listener, nor for specifying these paths as an array of segments as is possible in many of the procedural APIs. There is also no facility for supplying namespaces for these listeners so that they can easily be overridden and removed.

      Proposal:

      Support a new entry in the RHS of a modelListener declaration named pathSpec. If this is present, we reinterpret the key as a namespace rather than as a path, if no namespace is supplied in the record.

      pathSpec can hold: i) an individual string matching the syntax that we used to support as modelListener keys,
      OR ii) an entry

      {context: <string>, segs: Array}

      holding a fully parsed-out IoC reference (with "*" supported as a path segment), OR iii) an array of entries such as i) or ii)

      We will try to deprecate the old convention where LHS holds the path spec as soon as possible, and return modelListeners to a model like that for distributeOptions where the LHS key is expected to be a namespace only.

      An explicit "namespace" entry in the RHS will supplant any namespace held as the key.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                antranig Antranig Basman
                Reporter:
                antranig Antranig Basman
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: