@Test @SuppressWarnings("all") public void buildInitialisationCommands() { final List<Command> commands = tested.buildInitialisationCommands(); assertEquals(1, commands.size()); final AddNodeCommand addNodeCommand = (AddNodeCommand) commands.get(0); assertEquals(addNodeCommand.getCandidate(), diagramNode); }
@Override protected List<Command> buildInitialisationCommands() { final List<Command> commands = new ArrayList<>(); final Node<Definition<BPMNDiagram>, Edge> diagramNode = (Node<Definition<BPMNDiagram>, Edge>) factoryManager.newElement(UUID.uuid(), getDefinitionId(getDiagramType())); commands.add(graphCommandFactory.addNode(diagramNode)); final AdHoc adHoc = diagramNode.getContent().getDefinition().getDiagramSet().getAdHoc(); adHoc.setValue(true); return commands; }
CaseGraphFactoryImpl extends BPMNGraphFactoryImpl { @Override protected List<Command> buildInitialisationCommands() { final List<Command> commands = new ArrayList<>(); final Node<Definition<BPMNDiagram>, Edge> diagramNode = (Node<Definition<BPMNDiagram>, Edge>) factoryManager.newElement(UUID.uuid(), getDefinitionId(getDiagramType())); commands.add(graphCommandFactory.addNode(diagramNode)); final AdHoc adHoc = diagramNode.getContent().getDefinition().getDiagramSet().getAdHoc(); adHoc.setValue(true); return commands; } }
CaseGraphFactoryImpl extends BPMNGraphFactoryImpl { @Override protected List<Command> buildInitialisationCommands() { final List<Command> commands = new ArrayList<>(); final Node<Definition<BPMNDiagram>, Edge> diagramNode = (Node<Definition<BPMNDiagram>, Edge>) factoryManager.newElement(UUID.uuid(), getDefinitionId(getDiagramType())); commands.add(graphCommandFactory.addNode(diagramNode)); final AdHoc adHoc = diagramNode.getContent().getDefinition().getDiagramSet().getAdHoc(); adHoc.setValue(true); return commands; } CaseGraphFactoryImpl(); @Inject  CaseGraphFactoryImpl(DefinitionManager definitionManager, FactoryManager factoryManager,
                                RuleManager ruleManager, GraphCommandManager graphCommandManager,
                                GraphCommandFactory graphCommandFactory, GraphIndexBuilder<?> indexBuilder,
                                CustomTaskFactory customTaskFactory,
                                WorkItemDefinitionLookupService workItemDefinitionService); }
CaseGraphFactoryImpl extends BPMNGraphFactoryImpl { @Override protected List<Command> buildInitialisationCommands() { final List<Command> commands = new ArrayList<>(); final Node<Definition<BPMNDiagram>, Edge> diagramNode = (Node<Definition<BPMNDiagram>, Edge>) factoryManager.newElement(UUID.uuid(), getDefinitionId(getDiagramType())); commands.add(graphCommandFactory.addNode(diagramNode)); final AdHoc adHoc = diagramNode.getContent().getDefinition().getDiagramSet().getAdHoc(); adHoc.setValue(true); return commands; } CaseGraphFactoryImpl(); @Inject  CaseGraphFactoryImpl(DefinitionManager definitionManager, FactoryManager factoryManager,
                                RuleManager ruleManager, GraphCommandManager graphCommandManager,
                                GraphCommandFactory graphCommandFactory, GraphIndexBuilder<?> indexBuilder,
                                CustomTaskFactory customTaskFactory,
                                WorkItemDefinitionLookupService workItemDefinitionService); @Override Graph<DefinitionSet, Node> build(String uuid, String definition, Metadata metadata); }
CaseGraphFactoryImpl extends BPMNGraphFactoryImpl { @Override protected List<Command> buildInitialisationCommands() { final List<Command> commands = new ArrayList<>(); final Node<Definition<BPMNDiagram>, Edge> diagramNode = (Node<Definition<BPMNDiagram>, Edge>) factoryManager.newElement(UUID.uuid(), getDefinitionId(getDiagramType())); commands.add(graphCommandFactory.addNode(diagramNode)); final AdHoc adHoc = diagramNode.getContent().getDefinition().getDiagramSet().getAdHoc(); adHoc.setValue(true); return commands; } CaseGraphFactoryImpl(); @Inject  CaseGraphFactoryImpl(DefinitionManager definitionManager, FactoryManager factoryManager,
                                RuleManager ruleManager, GraphCommandManager graphCommandManager,
                                GraphCommandFactory graphCommandFactory, GraphIndexBuilder<?> indexBuilder,
                                CustomTaskFactory customTaskFactory,
                                WorkItemDefinitionLookupService workItemDefinitionService); @Override Graph<DefinitionSet, Node> build(String uuid, String definition, Metadata metadata);  }