FLUID-5115: Update the model relay component to handle model transformations

Metadata

Source
FLUID-5115
Type
Bug
Priority
Major
Status
Closed
Resolution
Duplicate
Assignee
N/A
Reporter
Justin Obara
Created
2013-08-15T11:06:21.540-0400
Updated
2014-11-18T20:21:49.761-0500
Versions
N/A
Fixed Versions
  1. 1.5
Component
  1. Model Transformation System
  2. UI Options

Description

Currently the model relay does straight translations from an internal model path to an external model path.

However the discovery tool displays the need to be able to do transformation from one model structure to another during this translation. For example, in the discovery tool the model for the highContrast panel is {enabled: true} which really corresponds to a shared model of

{
theme: "bw",
links: true,
inputsLarger: true,
textFont: "arial"
}

The modelRelay's rules block should actually take in model transformation instructions and perform these on outgoing and incoming (using the inverse rules) model updates.

see:
http://wiki.gpii.net/index.php/Architecture_-_Available_transformation_functions
http://wiki.fluidproject.org/display/docs/fluid.model.transformWithRules

for the case of the one-to-many changes, look at the valueMapper