ConfigurationTableTabPanel class is quite small (approx 200 lines of code). Most of the work is done by existing midPoint user interface. MidPoint will parse the data structure (including the extension part), midPoint will apply the schema, midPoint will process authorizations and so on. MidPoint will also take care of computing and applying the changes (deltas) when the save button is pressed. Therefore all that is needed in the
ConfigurationTableTabPanel class is to create appropriate presentation of the data. This is an extremely powerful approach and it is seamlessly integrated with midPoint GUI. However, as this code has to use midPoint data structures to take advantages of existing midPoint functionality, the code may looks quite complex. And unfortunately there is currently only a very basic documentation. But that may change in the future (see "Experimental" section below).
The transform table is set to minimal processing in the schema extension. This means that midPoint code will process the data, but it will not do any automatic processing on it. User interface rendering is considered to be automatic processing in this case, therefore normal user interface will not show the transform table. The default presentation of the table is quite ugly and it takes a lot of space. We really do not want this to mess up the user interface. However, we want midPoint to set up all the data structures (GUI wrappers) for us. When those are in place then we can create the custom GUI form easily. And that is exactly what minimal processing means: prepare data structures, but do not try to do anything smart. We will do all the smart things in custom code.
Actual transformation of the data is implemented in a metarole. All organizational units that contain specific transform tables are assigned to this metaroles. The transformation algorithm is the same for all the organizational units, just the transformation table is different. Therefore it makes sense to implement and configure the algorithm in just a single place. And a metarole is a perfect place to do that. The mapping is a focus mapping that transforms one focal property (
fullName of a user) to a different property (