use of org.jowidgets.plugin.api.IPluginProperties in project jo-client-platform by jo-source.
the class ExecutorActionBuilderImpl method decorateActionWithPlugins.
private IAction decorateActionWithPlugins(final IAction action) {
IAction result = action;
final IPluginProperties properties = PluginProperties.create(IServiceActionDecoratorPlugin.SERVICE_TYPE_PROPERTY_KEY, IExecutorService.class);
final IExecutorService<?> executorService = (IExecutorService<?>) executor;
final List<IServiceActionDecoratorPlugin> plugins = PluginProvider.getPlugins(IServiceActionDecoratorPlugin.ID, properties);
for (final IServiceActionDecoratorPlugin plugin : plugins) {
result = plugin.decorate(result, executorService);
if (result == null) {
return null;
}
}
return result;
}
use of org.jowidgets.plugin.api.IPluginProperties in project jo-client-platform by jo-source.
the class LinkDeleterActionBuilderImpl method decorateActionWithPlugins.
private IAction decorateActionWithPlugins(final IAction action) {
IAction result = action;
final IPluginProperties properties = PluginProperties.create(IServiceActionDecoratorPlugin.SERVICE_TYPE_PROPERTY_KEY, ILinkDeleterService.class);
final List<IServiceActionDecoratorPlugin> plugins = PluginProvider.getPlugins(IServiceActionDecoratorPlugin.ID, properties);
for (final IServiceActionDecoratorPlugin plugin : plugins) {
result = plugin.decorate(result, deleterService);
if (result == null) {
return null;
}
}
return result;
}
use of org.jowidgets.plugin.api.IPluginProperties in project jo-client-platform by jo-source.
the class PasteLinkActionBuilderImpl method decorateActionWithPlugins.
private IAction decorateActionWithPlugins(final IAction action) {
IAction result = action;
final IPluginProperties properties = PluginProperties.create(IServiceActionDecoratorPlugin.SERVICE_TYPE_PROPERTY_KEY, ILinkCreatorService.class);
final List<IServiceActionDecoratorPlugin> plugins = PluginProvider.getPlugins(IServiceActionDecoratorPlugin.ID, properties);
for (final IServiceActionDecoratorPlugin plugin : plugins) {
result = plugin.decorate(result, linkCreatorService);
if (result == null) {
return null;
}
}
return result;
}
use of org.jowidgets.plugin.api.IPluginProperties in project jo-client-platform by jo-source.
the class SingleBeanModelBuilder method modifyFromBeanModelPlugins.
@SuppressWarnings({ "rawtypes", "unchecked" })
private void modifyFromBeanModelPlugins() {
final IPluginPropertiesBuilder propBuilder = PluginToolkit.pluginPropertiesBuilder();
propBuilder.add(IBeanModelBuilderPlugin.ENTITIY_ID_PROPERTY_KEY, getEntityId());
propBuilder.add(IBeanModelBuilderPlugin.BEAN_TYPE_PROPERTY_KEY, getBeanType());
final IPluginProperties properties = propBuilder.build();
for (final IBeanModelBuilderPlugin plugin : PluginProvider.getPlugins(IBeanModelBuilderPlugin.ID, properties)) {
plugin.modify(this);
}
}
use of org.jowidgets.plugin.api.IPluginProperties in project jo-client-platform by jo-source.
the class SingleBeanModelImpl 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;
}
Aggregations