@Test public void testBuild() { Consumer<DefaultPaletteDefinition> resultConsumer = mock(Consumer.class); tested.build(canvasHandler, resultConsumer); verify(resultConsumer, times(1)).accept(eq(PALETTE_DEFINITION)); assertTrue(PALETTE_DEFINITION.getItems().isEmpty()); }
@Override public void build(final AbstractCanvasHandler canvasHandler, final Consumer<DefaultPaletteDefinition> paletteDefinitionConsumer) { paletteDefinitionBuilder .build(canvasHandler, paletteDefinition -> { paletteDefinition .getItems() .sort(Comparator.comparingInt(item -> getCategoryOrder(item.getId()))); createPaletteCustomTasksCategory(paletteDefinition, paletteDefinitionConsumer); }); }
BPMNPaletteDefinitionBuilder implements PaletteDefinitionBuilder<AbstractCanvasHandler, DefaultPaletteDefinition> { @Override public void build(final AbstractCanvasHandler canvasHandler, final Consumer<DefaultPaletteDefinition> paletteDefinitionConsumer) { paletteDefinitionBuilder .build(canvasHandler, paletteDefinition -> { paletteDefinition .getItems() .sort(Comparator.comparingInt(item -> getCategoryOrder(item.getId()))); createPaletteCustomTasksCategory(paletteDefinition, paletteDefinitionConsumer); }); } }
BPMNPaletteDefinitionBuilder implements PaletteDefinitionBuilder<AbstractCanvasHandler, DefaultPaletteDefinition> { @Override public void build(final AbstractCanvasHandler canvasHandler, final Consumer<DefaultPaletteDefinition> paletteDefinitionConsumer) { paletteDefinitionBuilder .build(canvasHandler, paletteDefinition -> { paletteDefinition .getItems() .sort(Comparator.comparingInt(item -> getCategoryOrder(item.getId()))); createPaletteCustomTasksCategory(paletteDefinition, paletteDefinitionConsumer); }); } protected  BPMNPaletteDefinitionBuilder(); @Inject  BPMNPaletteDefinitionBuilder(final DefinitionManager definitionManager,
                                        final ExpandedPaletteDefinitionBuilder paletteDefinitionBuilder,
                                        final StunnerTranslationService translationService,
                                        final ManagedInstance<WorkItemDefinitionRegistry> workItemDefinitionRegistry,
                                        final DefinitionUtils definitionUtils,
                                        final BPMNCategoryDefinitionProvider categoryDefinitionProvider);   BPMNPaletteDefinitionBuilder(final DefinitionManager definitionManager,
                                 final ExpandedPaletteDefinitionBuilder paletteDefinitionBuilder,
                                 final StunnerTranslationService translationService,
                                 final Supplier<WorkItemDefinitionRegistry> workItemDefinitionRegistry,
                                 final Function<WorkItemDefinition, CustomTask> customTaskBuilder,
                                 final DefinitionUtils definitionUtils,
                                 final BPMNCategoryDefinitionProvider categoryDefinitionProvider); }
BPMNPaletteDefinitionBuilder implements PaletteDefinitionBuilder<AbstractCanvasHandler, DefaultPaletteDefinition> { @Override public void build(final AbstractCanvasHandler canvasHandler, final Consumer<DefaultPaletteDefinition> paletteDefinitionConsumer) { paletteDefinitionBuilder .build(canvasHandler, paletteDefinition -> { paletteDefinition .getItems() .sort(Comparator.comparingInt(item -> getCategoryOrder(item.getId()))); createPaletteCustomTasksCategory(paletteDefinition, paletteDefinitionConsumer); }); } protected  BPMNPaletteDefinitionBuilder(); @Inject  BPMNPaletteDefinitionBuilder(final DefinitionManager definitionManager,
                                        final ExpandedPaletteDefinitionBuilder paletteDefinitionBuilder,
                                        final StunnerTranslationService translationService,
                                        final ManagedInstance<WorkItemDefinitionRegistry> workItemDefinitionRegistry,
                                        final DefinitionUtils definitionUtils,
                                        final BPMNCategoryDefinitionProvider categoryDefinitionProvider);   BPMNPaletteDefinitionBuilder(final DefinitionManager definitionManager,
                                 final ExpandedPaletteDefinitionBuilder paletteDefinitionBuilder,
                                 final StunnerTranslationService translationService,
                                 final Supplier<WorkItemDefinitionRegistry> workItemDefinitionRegistry,
                                 final Function<WorkItemDefinition, CustomTask> customTaskBuilder,
                                 final DefinitionUtils definitionUtils,
                                 final BPMNCategoryDefinitionProvider categoryDefinitionProvider); @PostConstruct void init(); @Override void build(final AbstractCanvasHandler canvasHandler,
                      final Consumer<DefaultPaletteDefinition> paletteDefinitionConsumer); }
BPMNPaletteDefinitionBuilder implements PaletteDefinitionBuilder<AbstractCanvasHandler, DefaultPaletteDefinition> { @Override public void build(final AbstractCanvasHandler canvasHandler, final Consumer<DefaultPaletteDefinition> paletteDefinitionConsumer) { paletteDefinitionBuilder .build(canvasHandler, paletteDefinition -> { paletteDefinition .getItems() .sort(Comparator.comparingInt(item -> getCategoryOrder(item.getId()))); createPaletteCustomTasksCategory(paletteDefinition, paletteDefinitionConsumer); }); } protected  BPMNPaletteDefinitionBuilder(); @Inject  BPMNPaletteDefinitionBuilder(final DefinitionManager definitionManager,
                                        final ExpandedPaletteDefinitionBuilder paletteDefinitionBuilder,
                                        final StunnerTranslationService translationService,
                                        final ManagedInstance<WorkItemDefinitionRegistry> workItemDefinitionRegistry,
                                        final DefinitionUtils definitionUtils,
                                        final BPMNCategoryDefinitionProvider categoryDefinitionProvider);   BPMNPaletteDefinitionBuilder(final DefinitionManager definitionManager,
                                 final ExpandedPaletteDefinitionBuilder paletteDefinitionBuilder,
                                 final StunnerTranslationService translationService,
                                 final Supplier<WorkItemDefinitionRegistry> workItemDefinitionRegistry,
                                 final Function<WorkItemDefinition, CustomTask> customTaskBuilder,
                                 final DefinitionUtils definitionUtils,
                                 final BPMNCategoryDefinitionProvider categoryDefinitionProvider); @PostConstruct void init(); @Override void build(final AbstractCanvasHandler canvasHandler,
                      final Consumer<DefaultPaletteDefinition> paletteDefinitionConsumer);  }