Search in sources :

Example 1 with DefinitionAdapter

use of org.kie.workbench.common.stunner.core.definition.adapter.DefinitionAdapter in project kie-wb-common by kiegroup.

the class ExpandedPaletteDefinitionBuilder method createItem.

@Override
protected DefaultPaletteItem createItem(final Object definition, final String categoryId, final Metadata metadata, final Function<String, DefaultPaletteItem> itemSupplier) {
    final DefinitionAdapter<Object> definitionAdapter = getDefinitionManager().adapters().forDefinition();
    final String id = definitionAdapter.getId(definition);
    DefaultPaletteCategory result = null;
    DefaultPaletteCategory category = (DefaultPaletteCategory) itemSupplier.apply(categoryId);
    if (null == category) {
        final int catPriority = getItemPriority(categoryId);
        final String catDefId = categoryDefinitionIdProvider.apply(categoryId);
        final String catTitle = categoryMessageProvider.getTitle(categoryId);
        final String catDesc = categoryMessageProvider.getDescription(categoryId);
        final Glyph categoryGlyph = categoryGlyphProvider.apply(categoryId);
        category = new CategoryBuilder().setPriority(catPriority).setItemId(categoryId).setDefinitionId(catDefId).setTitle(catTitle).setDescription(catDesc).setTooltip(catTitle).setGlyph(categoryGlyph).build();
        result = category;
    }
    final MorphDefinition morphDefinition = morphDefinitionProvider.apply(definition);
    final boolean hasMorphBase = null != morphDefinition;
    String morphDefault = null;
    DefaultPaletteGroup group = null;
    if (hasMorphBase) {
        final String morphBaseId = morphDefinition.getBase();
        if (groupFilter.test(morphBaseId)) {
            morphDefault = morphDefinition.getDefault();
            final Optional<DefaultPaletteItem> groupOp = category.getItems().stream().filter(g -> g.getId().equals(morphBaseId)).findFirst();
            if (!groupOp.isPresent()) {
                final int groupPriority = getItemPriority(morphBaseId);
                final String groupTitle = groupMessageProvider.getTitle(morphBaseId);
                final String groupDesc = groupMessageProvider.getDescription(morphBaseId);
                group = new GroupBuilder().setPriority(groupPriority).setItemId(morphBaseId).setDefinitionId(morphDefault).setTitle(groupTitle).setDescription(groupDesc).build();
                category.getItems().add(group);
            } else {
                group = (DefaultPaletteGroup) groupOp.get();
            }
        }
    } else {
        // item has no morph base, but might belong to a custom group
        final String customGroupId = customGroupIdProvider != null ? customGroupIdProvider.apply(id) : null;
        if (customGroupId != null && groupFilter.test(customGroupId)) {
            final Optional<DefaultPaletteItem> groupOp = category.getItems().stream().filter(g -> g.getId().equals(customGroupId)).findFirst();
            if (!groupOp.isPresent()) {
                final int groupPriority = getItemPriority(customGroupId);
                final String groupTitle = customGroupMessageProvider.getTitle(customGroupId);
                final String groupDesc = groupMessageProvider.getDescription(customGroupId);
                group = new GroupBuilder().setPriority(groupPriority).setItemId(customGroupId).setTitle(groupTitle).setDescription(groupDesc).build();
                category.getItems().add(group);
            } else {
                group = (DefaultPaletteGroup) groupOp.get();
            }
        }
    }
    final int itemPriority = getItemPriority(id);
    final String title = definitionAdapter.getTitle(definition);
    final String description = definitionAdapter.getDescription(definition);
    final DefaultPaletteItem item = new ItemBuilder().setPriority(itemPriority).setItemId(id).setDefinitionId(id).setTitle(title).setDescription(description).build();
    if (null != group) {
        if (null != morphDefault && morphDefault.equals(id)) {
            group.getItems().add(0, item);
        } else {
            group.getItems().add(item);
        }
    } else {
        category.getItems().add(item);
    }
    return result;
}
Also used : Default(javax.enterprise.inject.Default) DefinitionUtils(org.kie.workbench.common.stunner.core.util.DefinitionUtils) StunnerTranslationService(org.kie.workbench.common.stunner.core.i18n.StunnerTranslationService) Predicate(java.util.function.Predicate) GroupBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.GroupBuilder) ItemBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.ItemBuilder) Function(java.util.function.Function) ClientFactoryService(org.kie.workbench.common.stunner.core.client.service.ClientFactoryService) MorphDefinition(org.kie.workbench.common.stunner.core.definition.morph.MorphDefinition) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) Inject(javax.inject.Inject) DefinitionAdapter(org.kie.workbench.common.stunner.core.definition.adapter.DefinitionAdapter) DefaultMorphGroupMessageProvider(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionProviders.DefaultMorphGroupMessageProvider) Glyph(org.kie.workbench.common.stunner.core.definition.shape.Glyph) Dependent(javax.enterprise.context.Dependent) Optional(java.util.Optional) DefaultMessageProvider(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionProviders.DefaultMessageProvider) CategoryBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.CategoryBuilder) MorphDefinition(org.kie.workbench.common.stunner.core.definition.morph.MorphDefinition) GroupBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.GroupBuilder) ItemBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.ItemBuilder) CategoryBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.CategoryBuilder) Glyph(org.kie.workbench.common.stunner.core.definition.shape.Glyph)

Example 2 with DefinitionAdapter

use of org.kie.workbench.common.stunner.core.definition.adapter.DefinitionAdapter in project kie-wb-common by kiegroup.

the class ObserverBuilderControlTest method setup.

@Before
@SuppressWarnings("unchecked")
public void setup() throws Exception {
    doAnswer(new Answer() {

        @Override
        public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
            ServiceCallback<Node<View<Object>, Edge>> callback = (ServiceCallback<Node<View<Object>, Edge>>) (invocationOnMock.getArguments()[2]);
            view = new ViewImpl<>(new Object(), new BoundsImpl(new BoundImpl(0.0, 0.0), new BoundImpl(10.0, 20.0)));
            Node<View<Object>, Edge> item = new NodeImpl<>("UUID");
            item.setContent(view);
            callback.onSuccess(item);
            return null;
        }
    }).when(clientFactoryServices).newElement(anyString(), anyString(), any(ServiceCallback.class));
    when(graphBoundsIndexer.setRootUUID(anyString())).thenReturn(graphBoundsIndexer);
    AdapterManager adapters = mock(AdapterManager.class);
    DefinitionAdapter definitionAdapter = mock(DefinitionAdapter.class);
    DefinitionSetRuleAdapter rulesAdapter = mock(DefinitionSetRuleAdapter.class);
    when(definitionAdapter.getId(any())).thenReturn("Object");
    when(rulesAdapter.getRuleSet(any())).thenReturn(mock(RuleSet.class));
    when(adapters.forDefinition()).thenReturn(definitionAdapter);
    when(adapters.forRules()).thenReturn(rulesAdapter);
    when(clientDefinitionManager.adapters()).thenReturn(adapters);
    when(clientDefinitionManager.definitionSets()).thenReturn(mock(TypeDefinitionSetRegistry.class));
    when(canvasCommandFactory.addNode(any(Node.class), anyString())).thenAnswer(new Answer<Command>() {

        @Override
        public Command answer(InvocationOnMock invocationOnMock) {
            Node node = (Node) invocationOnMock.getArguments()[0];
            String uid = (String) invocationOnMock.getArguments()[1];
            return new AddCanvasNodeCommand(node, uid);
        }
    });
    when(canvasCommandFactory.updatePosition(any(Node.class), any(Point2D.class))).thenAnswer(new Answer<Command>() {

        @Override
        public Command answer(InvocationOnMock invocationOnMock) {
            Node node = (Node) invocationOnMock.getArguments()[0];
            Point2D location = (Point2D) invocationOnMock.getArguments()[1];
            return new UpdateElementPositionCommand(node, location);
        }
    });
    when(canvasCommandFactory.draw()).thenReturn(mock(CanvasCommand.class));
    ShapeSet shapeSet = mock(ShapeSet.class);
    ShapeFactory shapeFactory = mock(ShapeFactory.class);
    when(shapeFactory.newShape(any())).thenReturn(mock(ElementShape.class));
    when(shapeSet.getShapeFactory()).thenReturn(shapeFactory);
    when(shapeManager.getShapeSet(anyString())).thenReturn(shapeSet);
    when(shapeManager.getDefaultShapeSet(anyString())).thenReturn(shapeSet);
    tested = new ObserverBuilderControl(clientDefinitionManager, clientFactoryServices, graphUtils, ruleManager, canvasCommandFactory, graphBoundsIndexer, canvasLayoutUtils, mock(Event.class));
    Diagram diagram = mock(Diagram.class);
    Metadata metadata = mock(Metadata.class);
    when(metadata.getCanvasRootUUID()).thenReturn("ID");
    when(diagram.getMetadata()).thenReturn(metadata);
    MutableIndex index = mock(MutableIndex.class);
    Graph graph = mock(Graph.class);
    DefinitionSet graphContent = mock(DefinitionSet.class);
    when(graphContent.getBounds()).thenReturn(new BoundsImpl(new BoundImpl(10d, 10d), new BoundImpl(100d, 100d)));
    when(graph.getContent()).thenReturn(graphContent);
    when(index.getGraph()).thenReturn(graph);
    when(graphIndexBuilder.build(any(Graph.class))).thenReturn(index);
    canvasHandler = new CanvasHandlerImpl(clientDefinitionManager, canvasCommandFactory, clientFactoryServices, ruleManager, graphUtils, graphIndexBuilder, shapeManager, mock(TextPropertyProviderFactory.class), mock(Event.class), null, null, null);
    canvasHandler.handle(mock(AbstractCanvas.class));
    canvasHandler.draw(diagram, mock(ParameterizedCommand.class));
    when(diagram.getGraph()).thenReturn(graph);
    when(graph.nodes()).thenReturn(Collections.emptyList());
    CanvasCommandManager commandManager = mock(CanvasCommandManager.class);
    doAnswer(new Answer() {

        @Override
        public Object answer(InvocationOnMock invocationOnMock) throws Throwable {
            Command command = (Command) invocationOnMock.getArguments()[1];
            command.execute(invocationOnMock.getArguments()[0]);
            return null;
        }
    }).when(commandManager).execute(any(), any(Command.class));
    when(commandManagerProvider.getCommandManager()).thenReturn(commandManager);
    tested.enable(canvasHandler);
    tested.setCommandManagerProvider(commandManagerProvider);
}
Also used : TypeDefinitionSetRegistry(org.kie.workbench.common.stunner.core.registry.definition.TypeDefinitionSetRegistry) Node(org.kie.workbench.common.stunner.core.graph.Node) BoundImpl(org.kie.workbench.common.stunner.core.graph.content.view.BoundImpl) ShapeSet(org.kie.workbench.common.stunner.core.client.ShapeSet) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) ShapeFactory(org.kie.workbench.common.stunner.core.client.shape.factory.ShapeFactory) ObserverBuilderControl(org.kie.workbench.common.stunner.core.client.canvas.controls.builder.impl.ObserverBuilderControl) Matchers.anyString(org.mockito.Matchers.anyString) DefinitionAdapter(org.kie.workbench.common.stunner.core.definition.adapter.DefinitionAdapter) ServiceCallback(org.kie.workbench.common.stunner.core.client.service.ServiceCallback) AdapterManager(org.kie.workbench.common.stunner.core.definition.adapter.AdapterManager) Point2D(org.kie.workbench.common.stunner.core.graph.content.view.Point2D) ElementShape(org.kie.workbench.common.stunner.core.client.shape.ElementShape) ViewImpl(org.kie.workbench.common.stunner.core.graph.content.view.ViewImpl) BoundsImpl(org.kie.workbench.common.stunner.core.graph.content.view.BoundsImpl) DefinitionSet(org.kie.workbench.common.stunner.core.graph.content.definition.DefinitionSet) CanvasCommand(org.kie.workbench.common.stunner.core.client.command.CanvasCommand) RuleSet(org.kie.workbench.common.stunner.core.rule.RuleSet) MutableIndex(org.kie.workbench.common.stunner.core.graph.processing.index.MutableIndex) CanvasHandlerImpl(org.kie.workbench.common.stunner.core.client.canvas.CanvasHandlerImpl) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Diagram(org.kie.workbench.common.stunner.core.diagram.Diagram) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Answer(org.mockito.stubbing.Answer) Graph(org.kie.workbench.common.stunner.core.graph.Graph) CanvasCommand(org.kie.workbench.common.stunner.core.client.command.CanvasCommand) AddCanvasNodeCommand(org.kie.workbench.common.stunner.core.client.canvas.command.AddCanvasNodeCommand) ParameterizedCommand(org.uberfire.mvp.ParameterizedCommand) UpdateElementPositionCommand(org.kie.workbench.common.stunner.core.client.canvas.command.UpdateElementPositionCommand) Command(org.kie.workbench.common.stunner.core.command.Command) AbstractCanvas(org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvas) InvocationOnMock(org.mockito.invocation.InvocationOnMock) CanvasCommandManager(org.kie.workbench.common.stunner.core.client.command.CanvasCommandManager) AddCanvasNodeCommand(org.kie.workbench.common.stunner.core.client.canvas.command.AddCanvasNodeCommand) DefinitionSetRuleAdapter(org.kie.workbench.common.stunner.core.definition.adapter.DefinitionSetRuleAdapter) UpdateElementPositionCommand(org.kie.workbench.common.stunner.core.client.canvas.command.UpdateElementPositionCommand) Edge(org.kie.workbench.common.stunner.core.graph.Edge) ParameterizedCommand(org.uberfire.mvp.ParameterizedCommand) Before(org.junit.Before)

Example 3 with DefinitionAdapter

use of org.kie.workbench.common.stunner.core.definition.adapter.DefinitionAdapter in project kie-wb-common by kiegroup.

the class ClientDefinitionManager method init.

@PostConstruct
@SuppressWarnings("unchecked")
public void init() {
    // DefinitionSet client adapters.
    Collection<SyncBeanDef<DefinitionSetAdapter>> beanDefSetAdapters = beanManager.lookupBeans(DefinitionSetAdapter.class);
    for (SyncBeanDef<DefinitionSetAdapter> defSet : beanDefSetAdapters) {
        DefinitionSetAdapter definitionSet = defSet.getInstance();
        addAdapter(definitionSet);
    }
    // DefinitionSetRule client adapters.
    Collection<SyncBeanDef<DefinitionSetRuleAdapter>> beanDefSetRuleAdapters = beanManager.lookupBeans(DefinitionSetRuleAdapter.class);
    for (SyncBeanDef<DefinitionSetRuleAdapter> defSet : beanDefSetRuleAdapters) {
        DefinitionSetRuleAdapter definitionSet = defSet.getInstance();
        addAdapter(definitionSet);
    }
    // Definition client adapters.
    Collection<SyncBeanDef<DefinitionAdapter>> beanDefAdapters = beanManager.lookupBeans(DefinitionAdapter.class);
    for (SyncBeanDef<DefinitionAdapter> defSet : beanDefAdapters) {
        DefinitionAdapter definitionSet = defSet.getInstance();
        addAdapter(definitionSet);
    }
    // PropertySet client adapters.
    Collection<SyncBeanDef<PropertySetAdapter>> beanPropSetAdapters = beanManager.lookupBeans(PropertySetAdapter.class);
    for (SyncBeanDef<PropertySetAdapter> defSet : beanPropSetAdapters) {
        PropertySetAdapter definitionSet = defSet.getInstance();
        addAdapter(definitionSet);
    }
    // Property client adapters.
    Collection<SyncBeanDef<PropertyAdapter>> beanPropAdapters = beanManager.lookupBeans(PropertyAdapter.class);
    for (SyncBeanDef<PropertyAdapter> defSet : beanPropAdapters) {
        PropertyAdapter definitionSet = defSet.getInstance();
        addAdapter(definitionSet);
    }
    // Morph adapters.
    Collection<SyncBeanDef<MorphAdapter>> beanMorphAdapters = beanManager.lookupBeans(MorphAdapter.class);
    for (SyncBeanDef<MorphAdapter> morphAdapter : beanMorphAdapters) {
        MorphAdapter instance = morphAdapter.getInstance();
        addAdapter(instance);
    }
    // Once adapters present, add the Definition Sets found on current context.
    Collection<SyncBeanDef<DefinitionSetProxy>> beanDefSets = beanManager.lookupBeans(DefinitionSetProxy.class);
    for (SyncBeanDef<DefinitionSetProxy> defSet : beanDefSets) {
        DefinitionSetProxy definitionSetProxy = defSet.getInstance();
        Object definitionSet = definitionSetProxy.getDefinitionSet();
        addDefinitionSet(definitionSet);
    }
}
Also used : DefinitionSetProxy(org.kie.workbench.common.stunner.core.definition.DefinitionSetProxy) PropertySetAdapter(org.kie.workbench.common.stunner.core.definition.adapter.PropertySetAdapter) SyncBeanDef(org.jboss.errai.ioc.client.container.SyncBeanDef) DefinitionAdapter(org.kie.workbench.common.stunner.core.definition.adapter.DefinitionAdapter) DefinitionSetAdapter(org.kie.workbench.common.stunner.core.definition.adapter.DefinitionSetAdapter) DefinitionSetRuleAdapter(org.kie.workbench.common.stunner.core.definition.adapter.DefinitionSetRuleAdapter) PropertyAdapter(org.kie.workbench.common.stunner.core.definition.adapter.PropertyAdapter) MorphAdapter(org.kie.workbench.common.stunner.core.definition.adapter.MorphAdapter) PostConstruct(javax.annotation.PostConstruct)

Example 4 with DefinitionAdapter

use of org.kie.workbench.common.stunner.core.definition.adapter.DefinitionAdapter in project kie-wb-common by kiegroup.

the class BPMNPaletteDefinitionBuilder method createPaletteServiceTasksCategory.

private void createPaletteServiceTasksCategory(final DefaultPaletteDefinition paletteDefinition, final Consumer<DefaultPaletteDefinition> callback) {
    final ExpandedPaletteDefinitionBuilder.ItemMessageProvider categoryMessageProvider = paletteDefinitionBuilder.getCategoryMessageProvider();
    final Function<String, Glyph> categoryGlyphProvider = paletteDefinitionBuilder.getCategoryGlyphProvider();
    final Collection<WorkItemDefinition> workItemDefinitions = workItemDefinitionRegistry.get().items();
    if (!workItemDefinitions.isEmpty()) {
        final String serviceTasksTitle = categoryMessageProvider.getTitle(BPMNCategories.SERVICE_TASKS);
        final String serviceTasksDesc = categoryMessageProvider.getDescription(BPMNCategories.SERVICE_TASKS);
        final DefaultPaletteCategory workItemsCategory = new CategoryBuilder().setItemId(BPMNCategories.SERVICE_TASKS).setTitle(serviceTasksTitle).setDescription(serviceTasksDesc).setTooltip(serviceTasksTitle).setGlyph(categoryGlyphProvider.apply(BPMNCategories.SERVICE_TASKS)).build();
        int i = 0;
        for (final WorkItemDefinition workItemDefinition : workItemDefinitions) {
            final ServiceTask serviceTask = serviceTaskBuilder.apply(workItemDefinition);
            final DefinitionAdapter<Object> adapter = definitionManager.adapters().registry().getDefinitionAdapter(serviceTask.getClass());
            final String category = adapter.getCategory(serviceTask);
            DefaultPaletteGroup subcategoryGroup = null;
            final Optional<DefaultPaletteItem> subcategoryGroupOp = workItemsCategory.getItems().stream().filter(item -> category.equals(item.getId())).findFirst();
            if (!subcategoryGroupOp.isPresent()) {
                subcategoryGroup = new GroupBuilder().setItemId(category).setTitle(category).setDescription(category).build();
                workItemsCategory.getItems().add(subcategoryGroup);
            } else {
                subcategoryGroup = (DefaultPaletteGroup) subcategoryGroupOp.get();
            }
            final String defId = adapter.getId(serviceTask);
            final String title = adapter.getTitle(serviceTask);
            final String description = adapter.getDescription(serviceTask);
            final DefaultPaletteItem item = new ItemBuilder().setItemId(defId).setDefinitionId(defId).setTitle(title).setDescription(description).build();
            subcategoryGroup.getItems().add(item);
            // Link the first work item definition found to the work item's palette category.
            if (0 == i) {
                workItemsCategory.setDefinitionId(defId);
            }
            i++;
        }
        paletteDefinition.getItems().add(workItemsCategory);
    }
    callback.accept(paletteDefinition);
}
Also used : StartNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent) DefaultPaletteDefinition(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinition) DefaultPaletteCategory(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteCategory) SequenceFlow(org.kie.workbench.common.stunner.bpmn.definition.SequenceFlow) DefaultPaletteItem(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteItem) BPMNImageResources(org.kie.workbench.common.stunner.bpmn.client.resources.BPMNImageResources) ManagedInstance(org.jboss.errai.ioc.client.api.ManagedInstance) GroupBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.GroupBuilder) ItemBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.ItemBuilder) HashMap(java.util.HashMap) ParallelGateway(org.kie.workbench.common.stunner.bpmn.definition.ParallelGateway) Function(java.util.function.Function) Supplier(java.util.function.Supplier) WorkItemDefinition(org.kie.workbench.common.stunner.bpmn.workitem.WorkItemDefinition) Inject(javax.inject.Inject) DefinitionAdapter(org.kie.workbench.common.stunner.core.definition.adapter.DefinitionAdapter) Glyph(org.kie.workbench.common.stunner.core.definition.shape.Glyph) Map(java.util.Map) Lane(org.kie.workbench.common.stunner.bpmn.definition.Lane) ReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess) DefinitionManager(org.kie.workbench.common.stunner.core.api.DefinitionManager) CategoryDefinitionProvider(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionProviders.CategoryDefinitionProvider) Builder(org.kie.workbench.common.stunner.core.client.shape.SvgDataUriGlyph.Builder) DefaultPaletteGroup(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteGroup) ServiceTaskFactory(org.kie.workbench.common.stunner.bpmn.workitem.ServiceTaskFactory) ExpandedPaletteDefinitionBuilder(org.kie.workbench.common.stunner.core.client.components.palette.ExpandedPaletteDefinitionBuilder) StunnerTranslationService(org.kie.workbench.common.stunner.core.i18n.StunnerTranslationService) PaletteDefinitionBuilder(org.kie.workbench.common.stunner.core.client.components.palette.PaletteDefinitionBuilder) Predicate(java.util.function.Predicate) Collection(java.util.Collection) BPMNDiagramImpl(org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl) ServiceTask(org.kie.workbench.common.stunner.bpmn.workitem.ServiceTask) AbstractCanvasHandler(org.kie.workbench.common.stunner.core.client.canvas.AbstractCanvasHandler) DefaultPaletteDefinitionProviders(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionProviders) Consumer(java.util.function.Consumer) BPMNCategories(org.kie.workbench.common.stunner.bpmn.definition.BPMNCategories) DefaultPaletteDefinitionProviders.isType(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionProviders.isType) BPMN(org.kie.workbench.common.stunner.bpmn.qualifiers.BPMN) AbstractPaletteDefinitionBuilder(org.kie.workbench.common.stunner.core.client.components.palette.AbstractPaletteDefinitionBuilder) PostConstruct(javax.annotation.PostConstruct) Optional(java.util.Optional) IntermediateTimerEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateTimerEvent) WorkItemDefinitionRegistry(org.kie.workbench.common.stunner.bpmn.workitem.WorkItemDefinitionRegistry) ApplicationScoped(javax.enterprise.context.ApplicationScoped) NoneTask(org.kie.workbench.common.stunner.bpmn.definition.NoneTask) CategoryBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.CategoryBuilder) EndNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.EndNoneEvent) ServiceTask(org.kie.workbench.common.stunner.bpmn.workitem.ServiceTask) WorkItemDefinition(org.kie.workbench.common.stunner.bpmn.workitem.WorkItemDefinition) GroupBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.GroupBuilder) ExpandedPaletteDefinitionBuilder(org.kie.workbench.common.stunner.core.client.components.palette.ExpandedPaletteDefinitionBuilder) DefaultPaletteCategory(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteCategory) DefaultPaletteItem(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteItem) DefaultPaletteGroup(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteGroup) ItemBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.ItemBuilder) CategoryBuilder(org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.CategoryBuilder) Glyph(org.kie.workbench.common.stunner.core.definition.shape.Glyph)

Aggregations

DefinitionAdapter (org.kie.workbench.common.stunner.core.definition.adapter.DefinitionAdapter)3 Optional (java.util.Optional)2 Function (java.util.function.Function)2 Predicate (java.util.function.Predicate)2 PostConstruct (javax.annotation.PostConstruct)2 Inject (javax.inject.Inject)2 CategoryBuilder (org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.CategoryBuilder)2 GroupBuilder (org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.GroupBuilder)2 ItemBuilder (org.kie.workbench.common.stunner.core.client.components.palette.DefaultPaletteDefinitionBuilders.ItemBuilder)2 DefinitionSetRuleAdapter (org.kie.workbench.common.stunner.core.definition.adapter.DefinitionSetRuleAdapter)2 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)2 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 Consumer (java.util.function.Consumer)1 Supplier (java.util.function.Supplier)1 ApplicationScoped (javax.enterprise.context.ApplicationScoped)1 Dependent (javax.enterprise.context.Dependent)1 Default (javax.enterprise.inject.Default)1 ManagedInstance (org.jboss.errai.ioc.client.api.ManagedInstance)1