Search in sources :

Example 26 with IPluginPropertiesBuilder

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);
    }
}
Also used : IPluginProperties(org.jowidgets.plugin.api.IPluginProperties) IBeanModelBuilderPlugin(org.jowidgets.cap.ui.api.plugin.IBeanModelBuilderPlugin) IPluginPropertiesBuilder(org.jowidgets.plugin.api.IPluginPropertiesBuilder)

Example 27 with IPluginPropertiesBuilder

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;
    }
}
Also used : IPluginProperties(org.jowidgets.plugin.api.IPluginProperties) IEntityComponentRelationTreeViewPlugin(org.jowidgets.cap.ui.api.plugin.IEntityComponentRelationTreeViewPlugin) IPluginPropertiesBuilder(org.jowidgets.plugin.api.IPluginPropertiesBuilder) IContainer(org.jowidgets.api.widgets.IContainer)

Example 28 with IPluginPropertiesBuilder

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;
    }
}
Also used : IEntityComponentRelationTreeDetailViewPlugin(org.jowidgets.cap.ui.api.plugin.IEntityComponentRelationTreeDetailViewPlugin) IPluginProperties(org.jowidgets.plugin.api.IPluginProperties) IPluginPropertiesBuilder(org.jowidgets.plugin.api.IPluginPropertiesBuilder) ICapApiBluePrintFactory(org.jowidgets.cap.ui.api.widgets.ICapApiBluePrintFactory) IContainer(org.jowidgets.api.widgets.IContainer)

Example 29 with IPluginPropertiesBuilder

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;
}
Also used : IPluginPropertiesBuilder(org.jowidgets.plugin.api.IPluginPropertiesBuilder) ICustomFilterPredicateCreatorPlugin(org.jowidgets.cap.service.jpa.api.plugin.ICustomFilterPredicateCreatorPlugin)

Example 30 with IPluginPropertiesBuilder

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;
}
Also used : IPluginProperties(org.jowidgets.plugin.api.IPluginProperties) IBeanRelationTreeDetailPlugin(org.jowidgets.cap.ui.api.plugin.IBeanRelationTreeDetailPlugin) IPluginPropertiesBuilder(org.jowidgets.plugin.api.IPluginPropertiesBuilder)

Aggregations

IPluginPropertiesBuilder (org.jowidgets.plugin.api.IPluginPropertiesBuilder)34 IPluginProperties (org.jowidgets.plugin.api.IPluginProperties)21 LinkedList (java.util.LinkedList)6 List (java.util.List)6 IAttributePlugin (org.jowidgets.cap.ui.api.plugin.IAttributePlugin)5 IBeanModelBuilderPlugin (org.jowidgets.cap.ui.api.plugin.IBeanModelBuilderPlugin)5 ArrayList (java.util.ArrayList)3 IAttribute (org.jowidgets.cap.ui.api.attribute.IAttribute)3 IContainer (org.jowidgets.api.widgets.IContainer)2 IBeanProxyLabelRenderer (org.jowidgets.cap.ui.api.bean.IBeanProxyLabelRenderer)2 IBeanProxyLabelRendererPlugin (org.jowidgets.cap.ui.api.plugin.IBeanProxyLabelRendererPlugin)2 IMenuModel (org.jowidgets.api.model.item.IMenuModel)1 IBeanDtoCustomFilterPlugin (org.jowidgets.cap.common.api.plugin.IBeanDtoCustomFilterPlugin)1 IServiceIdDecoratorPlugin (org.jowidgets.cap.service.api.plugin.IServiceIdDecoratorPlugin)1 ICustomFilterPredicateCreatorPlugin (org.jowidgets.cap.service.jpa.api.plugin.ICustomFilterPredicateCreatorPlugin)1 IBeanFormPlugin (org.jowidgets.cap.ui.api.plugin.IBeanFormPlugin)1 IBeanRelationTreeDetailPlugin (org.jowidgets.cap.ui.api.plugin.IBeanRelationTreeDetailPlugin)1 IBeanRelationTreePlugin (org.jowidgets.cap.ui.api.plugin.IBeanRelationTreePlugin)1 IBeanTableMenuContributionPlugin (org.jowidgets.cap.ui.api.plugin.IBeanTableMenuContributionPlugin)1 IBeanTableMenuInterceptorPlugin (org.jowidgets.cap.ui.api.plugin.IBeanTableMenuInterceptorPlugin)1