use of org.jowidgets.cap.ui.api.plugin.IBeanRelationTreePlugin in project jo-client-platform by jo-source.
the class BeanRelationTreeImpl method modififySetupFromPlugins.
@SuppressWarnings({ "unchecked", "rawtypes" })
private IBeanRelationTreeBluePrint<CHILD_BEAN_TYPE> modififySetupFromPlugins(final IBeanRelationTreeBluePrint<CHILD_BEAN_TYPE> bluePrint) {
final IBeanRelationTreeBluePrint<CHILD_BEAN_TYPE> result = CapUiToolkit.bluePrintFactory().beanRelationTree();
result.setSetup(bluePrint);
final IBeanRelationNodeModel<Void, CHILD_BEAN_TYPE> rootNode = bluePrint.getModel().getRoot();
final IPluginPropertiesBuilder propertiesBuilder = PluginProperties.builder();
propertiesBuilder.add(IBeanRelationTreePlugin.ENTITIY_ID_PROPERTY_KEY, rootNode.getChildEntityId());
propertiesBuilder.add(IBeanRelationTreePlugin.BEAN_TYPE_PROPERTY_KEY, rootNode.getChildBeanType());
final IPluginProperties pluginProperties = propertiesBuilder.build();
final List<IBeanRelationTreePlugin<?>> plugins = PluginProvider.getPlugins(IBeanRelationTreePlugin.ID, pluginProperties);
for (final IBeanRelationTreePlugin plugin : plugins) {
plugin.modifySetup(pluginProperties, result);
}
return result;
}
Aggregations