@Test public void testOnDiagramNodeNullSelected() { presenter.onDiagramNodeSelected(null); verify(view).setValue(new ProcessNodeSummary()); verify(view).setNodeInstances(null); verify(view).setTimerInstances(null); }
public void onDiagramNodeSelected(final String nodeId) { if (nodeId == null) { view.setValue(new ProcessNodeSummary()); view.setNodeInstances(nodeInstances); view.setTimerInstances(timerInstances); } else { view.setValue(processNodes.stream().filter(node -> node.getUniqueId().equals(nodeId)).findFirst().orElseGet(() -> new ProcessNodeSummary())); view.setNodeInstances(nodeInstances.stream().filter(node -> node.getNodeUniqueName().equals(nodeId)).collect(toList())); view.setTimerInstances(getTimerInstanceForNode(nodeId)); } }
ProcessInstanceDiagramPresenter implements ProcessInstanceSummaryAware { public void onDiagramNodeSelected(final String nodeId) { if (nodeId == null) { view.setValue(new ProcessNodeSummary()); view.setNodeInstances(nodeInstances); view.setTimerInstances(timerInstances); } else { view.setValue(processNodes.stream().filter(node -> node.getUniqueId().equals(nodeId)).findFirst().orElseGet(() -> new ProcessNodeSummary())); view.setNodeInstances(nodeInstances.stream().filter(node -> node.getNodeUniqueName().equals(nodeId)).collect(toList())); view.setTimerInstances(getTimerInstanceForNode(nodeId)); } } }
ProcessInstanceDiagramPresenter implements ProcessInstanceSummaryAware { public void onDiagramNodeSelected(final String nodeId) { if (nodeId == null) { view.setValue(new ProcessNodeSummary()); view.setNodeInstances(nodeInstances); view.setTimerInstances(timerInstances); } else { view.setValue(processNodes.stream().filter(node -> node.getUniqueId().equals(nodeId)).findFirst().orElseGet(() -> new ProcessNodeSummary())); view.setNodeInstances(nodeInstances.stream().filter(node -> node.getNodeUniqueName().equals(nodeId)).collect(toList())); view.setTimerInstances(getTimerInstanceForNode(nodeId)); } }  }
ProcessInstanceDiagramPresenter implements ProcessInstanceSummaryAware { public void onDiagramNodeSelected(final String nodeId) { if (nodeId == null) { view.setValue(new ProcessNodeSummary()); view.setNodeInstances(nodeInstances); view.setTimerInstances(timerInstances); } else { view.setValue(processNodes.stream().filter(node -> node.getUniqueId().equals(nodeId)).findFirst().orElseGet(() -> new ProcessNodeSummary())); view.setNodeInstances(nodeInstances.stream().filter(node -> node.getNodeUniqueName().equals(nodeId)).collect(toList())); view.setTimerInstances(getTimerInstanceForNode(nodeId)); } }  @PostConstruct void init(); @Override void setProcessInstance(ProcessInstanceSummary processInstance); void onProcessInstanceSelectionEvent(@Observes final ProcessInstanceSelectionEvent event); void displayImage(final String svgContent, final String containerId); void onDiagramNodeSelected(final String nodeId); void onProcessNodeTrigger(final ProcessNodeSummary node); void listenParentProcessInstanceSelected(); void onNodeInstanceReTrigger(final NodeInstanceSummary node); void onNodeInstanceCancel(final NodeInstanceSummary node); void onTimerInstanceReschedule(final TimerInstanceSummary summary); void onShow(); @WorkbenchPartTitle String getName(); @WorkbenchPartView IsWidget getView(); @Inject void setProcessService(final Caller<ProcessRuntimeDataService> processService); void onProcessDiagramExpandEvent(@Observes ProcessDiagramExpandEvent event); }
ProcessInstanceDiagramPresenter implements ProcessInstanceSummaryAware { public void onDiagramNodeSelected(final String nodeId) { if (nodeId == null) { view.setValue(new ProcessNodeSummary()); view.setNodeInstances(nodeInstances); view.setTimerInstances(timerInstances); } else { view.setValue(processNodes.stream().filter(node -> node.getUniqueId().equals(nodeId)).findFirst().orElseGet(() -> new ProcessNodeSummary())); view.setNodeInstances(nodeInstances.stream().filter(node -> node.getNodeUniqueName().equals(nodeId)).collect(toList())); view.setTimerInstances(getTimerInstanceForNode(nodeId)); } }  @PostConstruct void init(); @Override void setProcessInstance(ProcessInstanceSummary processInstance); void onProcessInstanceSelectionEvent(@Observes final ProcessInstanceSelectionEvent event); void displayImage(final String svgContent, final String containerId); void onDiagramNodeSelected(final String nodeId); void onProcessNodeTrigger(final ProcessNodeSummary node); void listenParentProcessInstanceSelected(); void onNodeInstanceReTrigger(final NodeInstanceSummary node); void onNodeInstanceCancel(final NodeInstanceSummary node); void onTimerInstanceReschedule(final TimerInstanceSummary summary); void onShow(); @WorkbenchPartTitle String getName(); @WorkbenchPartView IsWidget getView(); @Inject void setProcessService(final Caller<ProcessRuntimeDataService> processService); void onProcessDiagramExpandEvent(@Observes ProcessDiagramExpandEvent event);  }