use of org.jowidgets.plugin.api.IPluginPropertiesBuilder in project jo-client-platform by jo-source.
the class BeanFormControl method createModifiedByPluginsAttributes.
@SuppressWarnings({ "unchecked", "rawtypes" })
private List<IAttribute<?>> createModifiedByPluginsAttributes(final Object entityId, final Class<BEAN_TYPE> beanType, final Collection<IAttribute<?>> attributes) {
List result = new LinkedList(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 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;
}
use of org.jowidgets.plugin.api.IPluginPropertiesBuilder 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.IPluginPropertiesBuilder in project jo-client-platform by jo-source.
the class BeanModifierImpl method createPluginProperties.
private IPluginProperties createPluginProperties(final Class<? extends BEAN_TYPE> beanType) {
final IPluginPropertiesBuilder builder = PluginToolkit.pluginPropertiesBuilder();
builder.add(IBeanModifierPlugin.BEAN_TYPE_PROPERTY_KEY, beanType);
return builder.build();
}
use of org.jowidgets.plugin.api.IPluginPropertiesBuilder in project jo-client-platform by jo-source.
the class BeanServicesProviderBuilderHelper method decorateServiceId.
private static <SERVICE_TYPE> IServiceId<SERVICE_TYPE> decorateServiceId(final IServiceId<SERVICE_TYPE> defaultId, final IServiceId<IEntityService> entityServiceId, final Class<? extends IBean> beanType, final Object entityId, final Class<SERVICE_TYPE> serviceType) {
IServiceId<SERVICE_TYPE> result = defaultId;
final IPluginPropertiesBuilder propertiesBuilder = PluginProperties.builder();
propertiesBuilder.add(IServiceIdDecoratorPlugin.BEAN_TYPE_PROPERTY_KEY, beanType);
propertiesBuilder.add(IServiceIdDecoratorPlugin.ENTITIY_ID_PROPERTY_KEY, entityId);
for (final IServiceIdDecoratorPlugin plugin : PluginProvider.getPlugins(IServiceIdDecoratorPlugin.ID, propertiesBuilder.build())) {
result = plugin.decorateServiceId(result, entityServiceId, beanType, entityId, serviceType);
}
return result;
}
Aggregations