use of org.jowidgets.plugin.api.IPluginPropertiesBuilder in project jo-client-platform by jo-source.
the class BeanRelationNodeModelBuilder 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 EntityRelationTreeView method initialize.
void initialize(final IBeanTable<?> rootTable, final IBeanRelationTreeModel<?> parentModel, final IBeanRelationTreeMenuInterceptor treeMenuInterceptor, final Collection<IAction> linkCreatorActions) {
if (!intialized) {
final IContainer container = context.getContainer();
container.setLayout(MigLayoutFactory.growingInnerCellLayout());
final IBeanRelationTreeBluePrint<?> beanRelationTreeBp = CapUiToolkit.bluePrintFactory().beanRelationTree(parentModel);
beanRelationTreeBp.setRootCreatorAction(rootTable.getDefaultCreatorAction());
beanRelationTreeBp.addMenuInterceptor(treeMenuInterceptor);
this.tree = container.add(beanRelationTreeBp, MigLayoutFactory.GROWING_CELL_CONSTRAINTS);
final IBeanTableModel<?> rootTableModel = rootTable.getModel();
final IPluginPropertiesBuilder propBuilder = PluginProperties.builder();
propBuilder.add(IEntityComponentRelationTreeViewPlugin.BEAN_TYPE_PROPERTY_KEY, rootTableModel.getBeanType());
propBuilder.add(IEntityComponentRelationTreeViewPlugin.ENTITIY_ID_PROPERTY_KEY, rootTableModel.getEntityId());
final IPluginProperties pluginProperties = propBuilder.build();
final List<IEntityComponentRelationTreeViewPlugin> plugins = PluginProvider.getPlugins(IEntityComponentRelationTreeViewPlugin.ID, pluginProperties);
for (final IEntityComponentRelationTreeViewPlugin plugin : plugins) {
plugin.onInitialize(pluginProperties, context, rootTable, tree, linkCreatorActions);
}
intialized = true;
}
}
use of org.jowidgets.plugin.api.IPluginPropertiesBuilder in project jo-client-platform by jo-source.
the class EntityRelationTreeDetailView method initialize.
void initialize(final IBeanTable<?> rootTable, final IBeanRelationTree<?> relationTree, final Collection<IAction> linkCreatorActions) {
if (!intialized) {
final IContainer container = context.getContainer();
container.setLayout(MigLayoutFactory.growingInnerCellLayout());
final ICapApiBluePrintFactory cbpf = CapUiToolkit.bluePrintFactory();
final IBeanRelationTreeDetailBluePrint<?> treeDetailBp = cbpf.beanRelationTreeDetail(relationTree.getModel());
final IBeanRelationTreeDetail<?> relationTreeDetail = container.add(treeDetailBp, MigLayoutFactory.GROWING_CELL_CONSTRAINTS);
final IBeanTableModel<?> rootTableModel = rootTable.getModel();
final IPluginPropertiesBuilder propBuilder = PluginProperties.builder();
propBuilder.add(IEntityComponentRelationTreeDetailViewPlugin.BEAN_TYPE_PROPERTY_KEY, rootTableModel.getBeanType());
propBuilder.add(IEntityComponentRelationTreeDetailViewPlugin.ENTITIY_ID_PROPERTY_KEY, rootTableModel.getEntityId());
final IPluginProperties pluginProperties = propBuilder.build();
final List<IEntityComponentRelationTreeDetailViewPlugin> plugins = PluginProvider.getPlugins(IEntityComponentRelationTreeDetailViewPlugin.ID, pluginProperties);
for (final IEntityComponentRelationTreeDetailViewPlugin plugin : plugins) {
plugin.onInitialize(pluginProperties, context, rootTable, relationTree, relationTreeDetail, linkCreatorActions);
}
intialized = true;
}
}
use of org.jowidgets.plugin.api.IPluginPropertiesBuilder in project jo-client-platform by jo-source.
the class CriteriaQueryCreator method getCustomFilterPredicateCreator.
@SuppressWarnings({ "rawtypes", "unchecked" })
private ICustomFilterPredicateCreator<PARAM_TYPE> getCustomFilterPredicateCreator(final ICustomFilter customFilter) {
ICustomFilterPredicateCreator<PARAM_TYPE> result = customFilterPredicateCreators.get(customFilter.getFilterType());
final IPluginPropertiesBuilder propertiesBuilder = PluginProperties.builder();
propertiesBuilder.add(ICustomFilterPredicateCreatorPlugin.FILTER_TYPE_PROPERTY_KEY, customFilter.getFilterType());
propertiesBuilder.add(ICustomFilterPredicateCreatorPlugin.BEAN_TYPE_PROPERTY_KEY, beanType);
final List<ICustomFilterPredicateCreatorPlugin<Object>> plugins = PluginProvider.getPlugins(ICustomFilterPredicateCreatorPlugin.ID, propertiesBuilder.build());
for (final ICustomFilterPredicateCreatorPlugin plugin : plugins) {
result = plugin.getPredicateCreator(result);
}
return result;
}
use of org.jowidgets.plugin.api.IPluginPropertiesBuilder in project jo-client-platform by jo-source.
the class BeanRelationTreeDetailImpl method modififySetupFromPlugins.
@SuppressWarnings({ "unchecked", "rawtypes" })
private IBeanRelationTreeDetailBluePrint<CHILD_BEAN_TYPE> modififySetupFromPlugins(final IBeanRelationTreeDetailBluePrint<CHILD_BEAN_TYPE> bluePrint) {
final IBeanRelationTreeDetailBluePrint<CHILD_BEAN_TYPE> result = CapUiToolkit.bluePrintFactory().beanRelationTreeDetail();
result.setSetup(bluePrint);
final IBeanRelationNodeModel<Void, CHILD_BEAN_TYPE> rootNode = bluePrint.getModel().getRoot();
final IPluginPropertiesBuilder propertiesBuilder = PluginProperties.builder();
propertiesBuilder.add(IBeanRelationTreeDetailPlugin.ENTITIY_ID_PROPERTY_KEY, rootNode.getChildEntityId());
propertiesBuilder.add(IBeanRelationTreeDetailPlugin.BEAN_TYPE_PROPERTY_KEY, rootNode.getChildBeanType());
final IPluginProperties pluginProperties = propertiesBuilder.build();
final List<IBeanRelationTreeDetailPlugin<?>> plugins = PluginProvider.getPlugins(IBeanRelationTreeDetailPlugin.ID, pluginProperties);
for (final IBeanRelationTreeDetailPlugin plugin : plugins) {
plugin.modifySetup(pluginProperties, result);
}
return result;
}
Aggregations