use of org.jowidgets.cap.ui.api.bean.IBeanProxyLabelRenderer in project jo-client-platform by jo-source.
the class BeanRelationNodeModelImpl method getPluginDecoratedRenderer.
@SuppressWarnings({ "rawtypes", "unchecked" })
private static IBeanProxyLabelRenderer getPluginDecoratedRenderer(final Object entityId, final Class<?> entityType, final IBeanProxyLabelRenderer renderer) {
final IPluginPropertiesBuilder propertiesBuilder = PluginProperties.builder();
propertiesBuilder.add(IBeanProxyLabelRendererPlugin.ENTITIY_ID_PROPERTY_KEY, entityId);
propertiesBuilder.add(IBeanProxyLabelRendererPlugin.BEAN_TYPE_PROPERTY_KEY, entityType);
final IPluginProperties properties = propertiesBuilder.build();
IBeanProxyLabelRenderer result = renderer;
for (final IBeanProxyLabelRendererPlugin plugin : PluginProvider.getPlugins(IBeanProxyLabelRendererPlugin.ID, properties)) {
final IDecorator<IBeanProxyLabelRenderer<?>> decorator = plugin.getRendererDecorator(properties);
if (decorator != null) {
result = decorator.decorate(result);
}
}
return result;
}
use of org.jowidgets.cap.ui.api.bean.IBeanProxyLabelRenderer in project jo-client-platform by jo-source.
the class BeanDeleterCommand method getPluginDecoratedRenderer.
@SuppressWarnings({ "rawtypes", "unchecked" })
private IBeanProxyLabelRenderer<BEAN_TYPE> getPluginDecoratedRenderer(final Object entityId, final Class<?> beanType, final IBeanProxyLabelRenderer<BEAN_TYPE> renderer) {
final IPluginPropertiesBuilder propertiesBuilder = PluginProperties.builder();
propertiesBuilder.add(IBeanProxyLabelRendererPlugin.ENTITIY_ID_PROPERTY_KEY, entityId);
propertiesBuilder.add(IBeanProxyLabelRendererPlugin.BEAN_TYPE_PROPERTY_KEY, beanType);
final IPluginProperties properties = propertiesBuilder.build();
IBeanProxyLabelRenderer result = renderer;
for (final IBeanProxyLabelRendererPlugin plugin : PluginProvider.getPlugins(IBeanProxyLabelRendererPlugin.ID, properties)) {
final IDecorator<IBeanProxyLabelRenderer<?>> decorator = plugin.getRendererDecorator(properties);
if (decorator != null) {
result = decorator.decorate(result);
}
}
return result;
}
Aggregations