@Test public void testProcessSummaryMapper_mapNull() { assertNull(new ProcessSummaryMapper().apply(null)); }
@Override public ProcessSummary apply(final ProcessDefinition definition) { if (definition == null) { return null; } final ProcessSummary summary = new ProcessSummary(definition.getId(), definition.getName(), definition.getContainerId(), definition.getVersion(), definition.isDynamic()); summary.setAssociatedEntities(definition.getAssociatedEntities()); summary.setProcessVariables(definition.getProcessVariables()); summary.setReusableSubProcesses(definition.getReusableSubProcesses()); summary.setServiceTasks(definition.getServiceTasks()); summary.setDynamicFormsEnabled(KieServerUtils.isKieServerRendererEnabled()); summary.setNodes(definition.getNodes() == null ? emptyList() : definition.getNodes().stream().map(node -> new ProcessNodeSummary(node.getId(), node.getName(), node.getType(), node.getUniqueId())).collect(toList())); summary.setTimers(definition.getTimers() == null ? emptyList() : definition.getTimers().stream().map(timer -> new TimerSummary(timer.getId(), timer.getNodeId(), timer.getNodeName(), timer.getUniqueId())).collect(toList())); return summary; }
ProcessSummaryMapper implements Function<ProcessDefinition, ProcessSummary> { @Override public ProcessSummary apply(final ProcessDefinition definition) { if (definition == null) { return null; } final ProcessSummary summary = new ProcessSummary(definition.getId(), definition.getName(), definition.getContainerId(), definition.getVersion(), definition.isDynamic()); summary.setAssociatedEntities(definition.getAssociatedEntities()); summary.setProcessVariables(definition.getProcessVariables()); summary.setReusableSubProcesses(definition.getReusableSubProcesses()); summary.setServiceTasks(definition.getServiceTasks()); summary.setDynamicFormsEnabled(KieServerUtils.isKieServerRendererEnabled()); summary.setNodes(definition.getNodes() == null ? emptyList() : definition.getNodes().stream().map(node -> new ProcessNodeSummary(node.getId(), node.getName(), node.getType(), node.getUniqueId())).collect(toList())); summary.setTimers(definition.getTimers() == null ? emptyList() : definition.getTimers().stream().map(timer -> new TimerSummary(timer.getId(), timer.getNodeId(), timer.getNodeName(), timer.getUniqueId())).collect(toList())); return summary; } }
ProcessSummaryMapper implements Function<ProcessDefinition, ProcessSummary> { @Override public ProcessSummary apply(final ProcessDefinition definition) { if (definition == null) { return null; } final ProcessSummary summary = new ProcessSummary(definition.getId(), definition.getName(), definition.getContainerId(), definition.getVersion(), definition.isDynamic()); summary.setAssociatedEntities(definition.getAssociatedEntities()); summary.setProcessVariables(definition.getProcessVariables()); summary.setReusableSubProcesses(definition.getReusableSubProcesses()); summary.setServiceTasks(definition.getServiceTasks()); summary.setDynamicFormsEnabled(KieServerUtils.isKieServerRendererEnabled()); summary.setNodes(definition.getNodes() == null ? emptyList() : definition.getNodes().stream().map(node -> new ProcessNodeSummary(node.getId(), node.getName(), node.getType(), node.getUniqueId())).collect(toList())); summary.setTimers(definition.getTimers() == null ? emptyList() : definition.getTimers().stream().map(timer -> new TimerSummary(timer.getId(), timer.getNodeId(), timer.getNodeName(), timer.getUniqueId())).collect(toList())); return summary; }  }
ProcessSummaryMapper implements Function<ProcessDefinition, ProcessSummary> { @Override public ProcessSummary apply(final ProcessDefinition definition) { if (definition == null) { return null; } final ProcessSummary summary = new ProcessSummary(definition.getId(), definition.getName(), definition.getContainerId(), definition.getVersion(), definition.isDynamic()); summary.setAssociatedEntities(definition.getAssociatedEntities()); summary.setProcessVariables(definition.getProcessVariables()); summary.setReusableSubProcesses(definition.getReusableSubProcesses()); summary.setServiceTasks(definition.getServiceTasks()); summary.setDynamicFormsEnabled(KieServerUtils.isKieServerRendererEnabled()); summary.setNodes(definition.getNodes() == null ? emptyList() : definition.getNodes().stream().map(node -> new ProcessNodeSummary(node.getId(), node.getName(), node.getType(), node.getUniqueId())).collect(toList())); summary.setTimers(definition.getTimers() == null ? emptyList() : definition.getTimers().stream().map(timer -> new TimerSummary(timer.getId(), timer.getNodeId(), timer.getNodeName(), timer.getUniqueId())).collect(toList())); return summary; }  @Override ProcessSummary apply(final ProcessDefinition definition); }
ProcessSummaryMapper implements Function<ProcessDefinition, ProcessSummary> { @Override public ProcessSummary apply(final ProcessDefinition definition) { if (definition == null) { return null; } final ProcessSummary summary = new ProcessSummary(definition.getId(), definition.getName(), definition.getContainerId(), definition.getVersion(), definition.isDynamic()); summary.setAssociatedEntities(definition.getAssociatedEntities()); summary.setProcessVariables(definition.getProcessVariables()); summary.setReusableSubProcesses(definition.getReusableSubProcesses()); summary.setServiceTasks(definition.getServiceTasks()); summary.setDynamicFormsEnabled(KieServerUtils.isKieServerRendererEnabled()); summary.setNodes(definition.getNodes() == null ? emptyList() : definition.getNodes().stream().map(node -> new ProcessNodeSummary(node.getId(), node.getName(), node.getType(), node.getUniqueId())).collect(toList())); summary.setTimers(definition.getTimers() == null ? emptyList() : definition.getTimers().stream().map(timer -> new TimerSummary(timer.getId(), timer.getNodeId(), timer.getNodeName(), timer.getUniqueId())).collect(toList())); return summary; }  @Override ProcessSummary apply(final ProcessDefinition definition);  }