use of org.jowidgets.cap.ui.api.plugin.IBeanTableModelPlugin in project jo-client-platform by jo-source.
the class BeanTableModelImpl method createModifiedByPluginsAttributes.
private List<IAttribute<Object>> createModifiedByPluginsAttributes(final Object entityId, final Class<BEAN_TYPE> beanType, final List<IAttribute<Object>> attributes) {
List<IAttribute<Object>> result = attributes;
IPluginPropertiesBuilder propBuilder = PluginToolkit.pluginPropertiesBuilder();
propBuilder.add(IAttributePlugin.ENTITIY_ID_PROPERTY_KEY, entityId);
propBuilder.add(IAttributePlugin.BEAN_TYPE_PROPERTY_KEY, beanType);
IPluginProperties properties = propBuilder.build();
for (final IAttributePlugin plugin : PluginProvider.getPlugins(IAttributePlugin.ID, properties)) {
result = plugin.modifyAttributes(properties, result);
}
propBuilder = PluginToolkit.pluginPropertiesBuilder();
propBuilder.add(IBeanTableModelPlugin.ENTITIY_ID_PROPERTY_KEY, entityId);
propBuilder.add(IBeanTableModelPlugin.BEAN_TYPE_PROPERTY_KEY, beanType);
properties = propBuilder.build();
for (final IBeanTableModelPlugin plugin : PluginProvider.getPlugins(IBeanTableModelPlugin.ID, properties)) {
result = plugin.modifyTableAttributes(properties, result);
}
return result;
}
Aggregations