use of org.jowidgets.plugin.api.IPluginPropertiesBuilder in project jo-client-platform by jo-source.
the class BeanTabFolderModelImpl 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;
final IPluginPropertiesBuilder propBuilder = PluginToolkit.pluginPropertiesBuilder();
propBuilder.add(IAttributePlugin.ENTITIY_ID_PROPERTY_KEY, entityId);
propBuilder.add(IAttributePlugin.BEAN_TYPE_PROPERTY_KEY, beanType);
final IPluginProperties properties = propBuilder.build();
for (final IAttributePlugin plugin : PluginProvider.getPlugins(IAttributePlugin.ID, properties)) {
result = plugin.modifyAttributes(properties, result);
}
return result;
}
use of org.jowidgets.plugin.api.IPluginPropertiesBuilder 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.plugin.api.IPluginPropertiesBuilder in project jo-client-platform by jo-source.
the class BeanSelectionObservable method fireSelectionChangedOnPlugins.
@SuppressWarnings({ "rawtypes", "unchecked" })
private void fireSelectionChangedOnPlugins(final IBeanSelectionEvent event) {
final Class<?> beanType = event.getBeanType();
final Class<?> eventSourceType = event.getSource().getClass();
final IPluginPropertiesBuilder propBuilder = PluginToolkit.pluginPropertiesBuilder();
propBuilder.add(IBeanSelectionProviderPlugin.ENTITIY_ID_PROPERTY_KEY, event.getEntityId());
propBuilder.add(IBeanSelectionProviderPlugin.BEAN_TYPE_PROPERTY_KEY, beanType);
propBuilder.add(IBeanSelectionProviderPlugin.SELECTION_SOURCE_TYPE_PROPERTY_KEY, eventSourceType);
propBuilder.add(IBeanSelectionProviderPlugin.SELECTION_EMPTY_PROPERTY_KEY, event.getFirstSelected() == null);
final IPluginProperties properties = propBuilder.build();
for (final IBeanSelectionProviderPlugin<?> plugin : PluginProvider.getPlugins(IBeanSelectionProviderPlugin.ID, properties)) {
plugin.selectionChanged(event, properties);
}
}
use of org.jowidgets.plugin.api.IPluginPropertiesBuilder in project jo-client-platform by jo-source.
the class UpdaterServiceBuilderImpl method createPluginProperties.
private IPluginProperties createPluginProperties() {
final IPluginPropertiesBuilder builder = PluginProperties.builder();
builder.add(IUpdaterServiceBuilderPlugin.BEAN_TYPE_PROPERTY_KEY, beanAccess.getBeanType());
builder.add(IUpdaterServiceBuilderPlugin.BEAN_TYPE_ID_PROPERTY_KEY, beanAccess.getBeanTypeId());
return builder.build();
}
use of org.jowidgets.plugin.api.IPluginPropertiesBuilder in project jo-client-platform by jo-source.
the class SyncExecutorServiceImpl method createExecutorServiceInterceptorPlugins.
@SuppressWarnings({ "rawtypes", "unchecked" })
private List<IExecutorServiceInterceptorPlugin<BEAN_TYPE, PARAM_TYPE>> createExecutorServiceInterceptorPlugins(final Class<?> beanType) {
final IPluginPropertiesBuilder propBuilder = PluginToolkit.pluginPropertiesBuilder();
propBuilder.add(IExecutorServiceInterceptorPlugin.BEAN_TYPE_PROPERTY_KEY, beanType);
final List result = PluginProvider.getPlugins(IExecutorServiceInterceptorPlugin.ID, propBuilder.build());
return result;
}
Aggregations