{
// abstract UI modelling
InteractionUnit overview = new InteractionUnit("datasourceOverview", "Datasources");
overview.setRole(Overview);
DataSelection table = new DataSelection("table", "Datasources");
table.setRole(SingleSelect);
overview.add(table);
InteractionUnit tabs = new InteractionUnit("datasourceAttributes", "Datasource");
tabs.setRole(Overview);
overview.add(tabs);
DataInputOutput basicAttributes = new DataInputOutput("basicAttributes", "Attributes");
basicAttributes.setRole(Edit);
tabs.add(basicAttributes);
DataInputOutput connectionAttributes = new DataInputOutput("connectionAttributes", "Connection");
connectionAttributes.setRole(Edit);
tabs.add(connectionAttributes);
// reificationStrategies steps (required)
Mapping tableMapping = new ResourceMapping("datasourceTable",
"/profile=${profile}/subsystem=datasources/data-source=*")
.addAttributes("${resource.name}", "jndi-name", "enabled");
Mapping editMapping = new ResourceMapping("datasourceForm",
"/profile=${profile}/subsystem=datasources/data-source=${datasource}")
.addAttributes("${resource.name}", "jndi-name", "enabled", "driver-name",
"share-prepared-statements", "prepared-statements-cache-size");
table.getEntityContext().addMapping(tableMapping);
basicAttributes.getEntityContext().addMapping(editMapping);
return overview;
}