Search in sources :

Example 1 with IBeanRelationTreeDetailPlugin

use of org.jowidgets.cap.ui.api.plugin.IBeanRelationTreeDetailPlugin in project jo-client-platform by jo-source.

the class BeanRelationTreeDetailImpl method modififySetupFromPlugins.

@SuppressWarnings({ "unchecked", "rawtypes" })
private IBeanRelationTreeDetailBluePrint<CHILD_BEAN_TYPE> modififySetupFromPlugins(final IBeanRelationTreeDetailBluePrint<CHILD_BEAN_TYPE> bluePrint) {
    final IBeanRelationTreeDetailBluePrint<CHILD_BEAN_TYPE> result = CapUiToolkit.bluePrintFactory().beanRelationTreeDetail();
    result.setSetup(bluePrint);
    final IBeanRelationNodeModel<Void, CHILD_BEAN_TYPE> rootNode = bluePrint.getModel().getRoot();
    final IPluginPropertiesBuilder propertiesBuilder = PluginProperties.builder();
    propertiesBuilder.add(IBeanRelationTreeDetailPlugin.ENTITIY_ID_PROPERTY_KEY, rootNode.getChildEntityId());
    propertiesBuilder.add(IBeanRelationTreeDetailPlugin.BEAN_TYPE_PROPERTY_KEY, rootNode.getChildBeanType());
    final IPluginProperties pluginProperties = propertiesBuilder.build();
    final List<IBeanRelationTreeDetailPlugin<?>> plugins = PluginProvider.getPlugins(IBeanRelationTreeDetailPlugin.ID, pluginProperties);
    for (final IBeanRelationTreeDetailPlugin plugin : plugins) {
        plugin.modifySetup(pluginProperties, result);
    }
    return result;
}
Also used : IPluginProperties(org.jowidgets.plugin.api.IPluginProperties) IBeanRelationTreeDetailPlugin(org.jowidgets.cap.ui.api.plugin.IBeanRelationTreeDetailPlugin) IPluginPropertiesBuilder(org.jowidgets.plugin.api.IPluginPropertiesBuilder)

Aggregations

IBeanRelationTreeDetailPlugin (org.jowidgets.cap.ui.api.plugin.IBeanRelationTreeDetailPlugin)1 IPluginProperties (org.jowidgets.plugin.api.IPluginProperties)1 IPluginPropertiesBuilder (org.jowidgets.plugin.api.IPluginPropertiesBuilder)1