use of org.jowidgets.cap.ui.api.table.IBeanTableMenuInterceptor in project jo-client-platform by jo-source.
the class BeanTableImpl method getMenuInterceptorsFromPlugins.
@SuppressWarnings({ "unchecked", "rawtypes" })
private List<IBeanTableMenuInterceptor<BEAN_TYPE>> getMenuInterceptorsFromPlugins(final IBeanTableMenuInterceptor<BEAN_TYPE> initialInterceptor, final Object entityId, final Class<BEAN_TYPE> beanType) {
final List<IBeanTableMenuInterceptor<BEAN_TYPE>> result = new LinkedList<IBeanTableMenuInterceptor<BEAN_TYPE>>();
if (initialInterceptor != null) {
result.add(initialInterceptor);
}
final IPluginPropertiesBuilder propBuilder = PluginToolkit.pluginPropertiesBuilder();
propBuilder.add(IBeanTableMenuInterceptorPlugin.ENTITIY_ID_PROPERTY_KEY, entityId);
propBuilder.add(IBeanTableMenuInterceptorPlugin.BEAN_TYPE_PROPERTY_KEY, beanType);
final IPluginProperties properties = propBuilder.build();
final List<IBeanTableMenuInterceptorPlugin<?>> plugins = PluginProvider.getPlugins(IBeanTableMenuInterceptorPlugin.ID, properties);
for (final IBeanTableMenuInterceptorPlugin plugin : plugins) {
final IBeanTableMenuInterceptor<?> interceptor = plugin.getMenuInterceptor(properties, this);
if (interceptor != null) {
result.add((IBeanTableMenuInterceptor<BEAN_TYPE>) interceptor);
}
}
return result;
}
Aggregations