Add support for a wildcard mergePolicy.

Description

Currently there's not support for a wildcard mergePolicy.

For example we would like to be able to declare the following policy:

mergePolicy: {     "*.someObject": "noexpand" }

Which would result in no expansion for every second level (in the tree) "someObject" object.

The issue first arose in GPII's lifecycle manager where we used now removed non-api function fluid.resolveEnvironment. We switched to using fluid.expand that acts almost in the same way. The noticeable difference between the two was that the latter one actually knows how to handle expanders (unlike the former).
The object that was expanded with fluid.expand contains expanders but in the path that should not be expanded by the utility. Thus we were required to write an optional mergePolicy that would indicate that that particular path doesn't need to be expanded.

Currently in order to do that we have to express it with an expanded version of the mergePolicy:

mergePolicy: { someParent: { someObject: { "*": { "noexpand": true // "noexpand" } } } }

Example of the expanded material:

[ { "capabilities": [ "applications.org\\.gnome\\.desktop\\.a11y.magnifier.id" ], "settings": { "mouse-tracking": "centered" } "capabilitiesTransformations": { "mag-factor": "display.screenEnhancement.magnification", "mouse-tracking": { "expander": { "type": "fluid.model.transform.valueMapper", "inputPath": "display.screenEnhancement.tracking", "options": { "mouse": { "outputValue": "centered" } } } } } } ]

Environment

None

Activity

Details

Assignee

Reporter

Components

Affects versions

Priority

Created March 12, 2013 at 8:08 PM
Updated November 1, 2018 at 2:47 PM