@Test public void testCreateColorUrlParams() { String completedNodeColor = "#FFFFFF"; String completedNodeBorderColor = "#C0C0C0"; String activeNodeBorderColor = "#F0F0F0"; KieServicesConfiguration configuration = KieServicesFactory.newRestConfiguration("testServerUrl", "testUSer", "TestPassword"); UIServicesClientImpl uiServicesClientImpl = new UIServicesClientImpl(configuration); assertEquals("", uiServicesClientImpl.createColorURLParams("", "", "")); assertEquals("", uiServicesClientImpl.createColorURLParams(null, null, null)); assertEquals(RestURI.SVG_NODE_COMPLETED_COLOR + "=" + uiServicesClientImpl.encode(completedNodeColor) + "&" + RestURI.SVG_NODE_COMPLETED_BORDER_COLOR + "=" + uiServicesClientImpl.encode(completedNodeBorderColor) + "&" + RestURI.SVG_NODE_ACTIVE_COLOR + "=" + uiServicesClientImpl.encode(activeNodeBorderColor), uiServicesClientImpl.createColorURLParams(completedNodeColor, completedNodeBorderColor, activeNodeBorderColor)); assertEquals(RestURI.SVG_NODE_COMPLETED_COLOR + "=" + uiServicesClientImpl.encode(completedNodeColor), uiServicesClientImpl.createColorURLParams(completedNodeColor, "", "")); assertEquals(RestURI.SVG_NODE_COMPLETED_BORDER_COLOR + "=" + uiServicesClientImpl.encode(completedNodeBorderColor), uiServicesClientImpl.createColorURLParams("", completedNodeBorderColor, "")); assertEquals(RestURI.SVG_NODE_ACTIVE_COLOR + "=" + uiServicesClientImpl.encode(activeNodeBorderColor), uiServicesClientImpl.createColorURLParams("", "", activeNodeBorderColor)); assertEquals(RestURI.SVG_NODE_COMPLETED_COLOR + "=" + uiServicesClientImpl.encode(completedNodeColor) + "&" + RestURI.SVG_NODE_COMPLETED_BORDER_COLOR + "=" + uiServicesClientImpl.encode(completedNodeBorderColor), uiServicesClientImpl.createColorURLParams(completedNodeColor, completedNodeBorderColor, "")); assertEquals(RestURI.SVG_NODE_COMPLETED_BORDER_COLOR + "=" + uiServicesClientImpl.encode(completedNodeBorderColor) + "&" + RestURI.SVG_NODE_ACTIVE_COLOR + "=" + uiServicesClientImpl.encode(activeNodeBorderColor), uiServicesClientImpl.createColorURLParams("", completedNodeBorderColor, activeNodeBorderColor)); assertEquals(RestURI.SVG_NODE_COMPLETED_COLOR + "=" + uiServicesClientImpl.encode(completedNodeColor) + "&" + RestURI.SVG_NODE_ACTIVE_COLOR + "=" + uiServicesClientImpl.encode(activeNodeBorderColor), uiServicesClientImpl.createColorURLParams(completedNodeColor, "", activeNodeBorderColor)); }
protected String createColorURLParams(String completeNodeColor, String completeNodeBorderColor, String activeNodeBorderColor) { List<String> params = new ArrayList<>(); if(completeNodeColor != null && !completeNodeColor.isEmpty()) { params.add(RestURI.SVG_NODE_COMPLETED_COLOR + "=" + encode(completeNodeColor)); } if(completeNodeBorderColor != null && !completeNodeBorderColor.isEmpty()) { params.add(RestURI.SVG_NODE_COMPLETED_BORDER_COLOR + "=" + encode(completeNodeBorderColor)); } if(activeNodeBorderColor != null && !activeNodeBorderColor.isEmpty()) { params.add(RestURI.SVG_NODE_ACTIVE_COLOR + "=" + encode(activeNodeBorderColor)); } return String.join("&", params); }
UIServicesClientImpl extends AbstractKieServicesClientImpl implements UIServicesClient { protected String createColorURLParams(String completeNodeColor, String completeNodeBorderColor, String activeNodeBorderColor) { List<String> params = new ArrayList<>(); if(completeNodeColor != null && !completeNodeColor.isEmpty()) { params.add(RestURI.SVG_NODE_COMPLETED_COLOR + "=" + encode(completeNodeColor)); } if(completeNodeBorderColor != null && !completeNodeBorderColor.isEmpty()) { params.add(RestURI.SVG_NODE_COMPLETED_BORDER_COLOR + "=" + encode(completeNodeBorderColor)); } if(activeNodeBorderColor != null && !activeNodeBorderColor.isEmpty()) { params.add(RestURI.SVG_NODE_ACTIVE_COLOR + "=" + encode(activeNodeBorderColor)); } return String.join("&", params); } }
UIServicesClientImpl extends AbstractKieServicesClientImpl implements UIServicesClient { protected String createColorURLParams(String completeNodeColor, String completeNodeBorderColor, String activeNodeBorderColor) { List<String> params = new ArrayList<>(); if(completeNodeColor != null && !completeNodeColor.isEmpty()) { params.add(RestURI.SVG_NODE_COMPLETED_COLOR + "=" + encode(completeNodeColor)); } if(completeNodeBorderColor != null && !completeNodeBorderColor.isEmpty()) { params.add(RestURI.SVG_NODE_COMPLETED_BORDER_COLOR + "=" + encode(completeNodeBorderColor)); } if(activeNodeBorderColor != null && !activeNodeBorderColor.isEmpty()) { params.add(RestURI.SVG_NODE_ACTIVE_COLOR + "=" + encode(activeNodeBorderColor)); } return String.join("&", params); } UIServicesClientImpl(KieServicesConfiguration config);  UIServicesClientImpl(KieServicesConfiguration config, ClassLoader classLoader); }
UIServicesClientImpl extends AbstractKieServicesClientImpl implements UIServicesClient { protected String createColorURLParams(String completeNodeColor, String completeNodeBorderColor, String activeNodeBorderColor) { List<String> params = new ArrayList<>(); if(completeNodeColor != null && !completeNodeColor.isEmpty()) { params.add(RestURI.SVG_NODE_COMPLETED_COLOR + "=" + encode(completeNodeColor)); } if(completeNodeBorderColor != null && !completeNodeBorderColor.isEmpty()) { params.add(RestURI.SVG_NODE_COMPLETED_BORDER_COLOR + "=" + encode(completeNodeBorderColor)); } if(activeNodeBorderColor != null && !activeNodeBorderColor.isEmpty()) { params.add(RestURI.SVG_NODE_ACTIVE_COLOR + "=" + encode(activeNodeBorderColor)); } return String.join("&", params); } UIServicesClientImpl(KieServicesConfiguration config);  UIServicesClientImpl(KieServicesConfiguration config, ClassLoader classLoader); @Override String getProcessForm(String containerId, String processId, String language); @Override String getProcessFormByType(String containerId, String processId, String language, String formType); @Override String getProcessRawForm( String containerId, String processId ); @Override String getProcessForm(String containerId, String processId); @Override String getProcessFormByType(String containerId, String processId, String formType); @Override String getTaskForm(String containerId, Long taskId, String language); @Override String getTaskFormAsUser(String containerId, Long taskId, String language, String userId); @Override String getTaskFormByType(String containerId, Long taskId, String language, String formType); @Override String getTaskFormByTypeAsUser(String containerId, Long taskId, String language, String formType, String userId); @Override String getTaskForm(String containerId, Long taskId); @Override String getTaskFormByType(String containerId, Long taskId, String formType); @Override String getTaskRawForm(String containerId, Long taskId); @Override String getTaskRawFormAsUser(String containerId, Long taskId, String userId); @Override String getProcessImage(String containerId, String processId); @Override String getProcessInstanceImage(String containerId, Long processInstanceId); @Override String getProcessInstanceImageCustomColor(String containerId, Long processInstanceId, String completeNodeColor,
                                                     String completeNodeBorderColor, String activeNodeBorderColor); @Override String renderProcessForm(String containerId, String processId); @Override String renderProcessForm(String containerId, String processId, String renderer); @Override String renderCaseForm(String containerId, String caseDefinitionId); @Override String renderCaseForm(String containerId, String caseDefinitionId, String renderer); @Override String renderTaskForm(String containerId, Long taskId); @Override String renderTaskForm(String containerId, Long taskId, String renderer); }
UIServicesClientImpl extends AbstractKieServicesClientImpl implements UIServicesClient { protected String createColorURLParams(String completeNodeColor, String completeNodeBorderColor, String activeNodeBorderColor) { List<String> params = new ArrayList<>(); if(completeNodeColor != null && !completeNodeColor.isEmpty()) { params.add(RestURI.SVG_NODE_COMPLETED_COLOR + "=" + encode(completeNodeColor)); } if(completeNodeBorderColor != null && !completeNodeBorderColor.isEmpty()) { params.add(RestURI.SVG_NODE_COMPLETED_BORDER_COLOR + "=" + encode(completeNodeBorderColor)); } if(activeNodeBorderColor != null && !activeNodeBorderColor.isEmpty()) { params.add(RestURI.SVG_NODE_ACTIVE_COLOR + "=" + encode(activeNodeBorderColor)); } return String.join("&", params); } UIServicesClientImpl(KieServicesConfiguration config);  UIServicesClientImpl(KieServicesConfiguration config, ClassLoader classLoader); @Override String getProcessForm(String containerId, String processId, String language); @Override String getProcessFormByType(String containerId, String processId, String language, String formType); @Override String getProcessRawForm( String containerId, String processId ); @Override String getProcessForm(String containerId, String processId); @Override String getProcessFormByType(String containerId, String processId, String formType); @Override String getTaskForm(String containerId, Long taskId, String language); @Override String getTaskFormAsUser(String containerId, Long taskId, String language, String userId); @Override String getTaskFormByType(String containerId, Long taskId, String language, String formType); @Override String getTaskFormByTypeAsUser(String containerId, Long taskId, String language, String formType, String userId); @Override String getTaskForm(String containerId, Long taskId); @Override String getTaskFormByType(String containerId, Long taskId, String formType); @Override String getTaskRawForm(String containerId, Long taskId); @Override String getTaskRawFormAsUser(String containerId, Long taskId, String userId); @Override String getProcessImage(String containerId, String processId); @Override String getProcessInstanceImage(String containerId, Long processInstanceId); @Override String getProcessInstanceImageCustomColor(String containerId, Long processInstanceId, String completeNodeColor,
                                                     String completeNodeBorderColor, String activeNodeBorderColor); @Override String renderProcessForm(String containerId, String processId); @Override String renderProcessForm(String containerId, String processId, String renderer); @Override String renderCaseForm(String containerId, String caseDefinitionId); @Override String renderCaseForm(String containerId, String caseDefinitionId, String renderer); @Override String renderTaskForm(String containerId, Long taskId); @Override String renderTaskForm(String containerId, Long taskId, String renderer);  }