@Test public void testGetWorkflowNullReference() { Assert.assertNull(MyExperimentRESTClient.getWorkflow(null)); }
public WorkflowDescription getWorkflow(String id, String version) { GenericType<JAXBElement<WorkflowDescription>> workflowType = new GenericType<JAXBElement<WorkflowDescription>>() { }; try { LOG.debug("Querying myExperiments for workflow id [{}]", id); return myExperiment.path(WORKFLOW_PATH).queryParam("id", id).queryParam("version", version) .queryParam("elements", WORKFLOW_ELEMENTS).accept(MediaType.APPLICATION_XML_TYPE).get(workflowType) .getValue(); } catch (UniformInterfaceException e) { if (e.getResponse().getStatus() == NOT_FOUND_STATUS) { return null; } else { throw e; } } }
MyExperimentRESTClient implements Serializable { public WorkflowDescription getWorkflow(String id, String version) { GenericType<JAXBElement<WorkflowDescription>> workflowType = new GenericType<JAXBElement<WorkflowDescription>>() { }; try { LOG.debug("Querying myExperiments for workflow id [{}]", id); return myExperiment.path(WORKFLOW_PATH).queryParam("id", id).queryParam("version", version) .queryParam("elements", WORKFLOW_ELEMENTS).accept(MediaType.APPLICATION_XML_TYPE).get(workflowType) .getValue(); } catch (UniformInterfaceException e) { if (e.getResponse().getStatus() == NOT_FOUND_STATUS) { return null; } else { throw e; } } } }
MyExperimentRESTClient implements Serializable { public WorkflowDescription getWorkflow(String id, String version) { GenericType<JAXBElement<WorkflowDescription>> workflowType = new GenericType<JAXBElement<WorkflowDescription>>() { }; try { LOG.debug("Querying myExperiments for workflow id [{}]", id); return myExperiment.path(WORKFLOW_PATH).queryParam("id", id).queryParam("version", version) .queryParam("elements", WORKFLOW_ELEMENTS).accept(MediaType.APPLICATION_XML_TYPE).get(workflowType) .getValue(); } catch (UniformInterfaceException e) { if (e.getResponse().getStatus() == NOT_FOUND_STATUS) { return null; } else { throw e; } } } MyExperimentRESTClient();  MyExperimentRESTClient(WebResource myExperiment); }
MyExperimentRESTClient implements Serializable { public WorkflowDescription getWorkflow(String id, String version) { GenericType<JAXBElement<WorkflowDescription>> workflowType = new GenericType<JAXBElement<WorkflowDescription>>() { }; try { LOG.debug("Querying myExperiments for workflow id [{}]", id); return myExperiment.path(WORKFLOW_PATH).queryParam("id", id).queryParam("version", version) .queryParam("elements", WORKFLOW_ELEMENTS).accept(MediaType.APPLICATION_XML_TYPE).get(workflowType) .getValue(); } catch (UniformInterfaceException e) { if (e.getResponse().getStatus() == NOT_FOUND_STATUS) { return null; } else { throw e; } } } MyExperimentRESTClient();  MyExperimentRESTClient(WebResource myExperiment); List<WorkflowInfo> searchComponents(ComponentQuery query); WorkflowDescription getWorkflow(String id, String version); List<WorkflowInfo> listWorkflows(String tag); List<WorkflowInfo> listWorkflows(); ComponentQuery createComponentQuery(); static WorkflowDescription getWorkflow(String descriptor); static String getWorkflowContent(WorkflowInfo workflowInfo); }
MyExperimentRESTClient implements Serializable { public WorkflowDescription getWorkflow(String id, String version) { GenericType<JAXBElement<WorkflowDescription>> workflowType = new GenericType<JAXBElement<WorkflowDescription>>() { }; try { LOG.debug("Querying myExperiments for workflow id [{}]", id); return myExperiment.path(WORKFLOW_PATH).queryParam("id", id).queryParam("version", version) .queryParam("elements", WORKFLOW_ELEMENTS).accept(MediaType.APPLICATION_XML_TYPE).get(workflowType) .getValue(); } catch (UniformInterfaceException e) { if (e.getResponse().getStatus() == NOT_FOUND_STATUS) { return null; } else { throw e; } } } MyExperimentRESTClient();  MyExperimentRESTClient(WebResource myExperiment); List<WorkflowInfo> searchComponents(ComponentQuery query); WorkflowDescription getWorkflow(String id, String version); List<WorkflowInfo> listWorkflows(String tag); List<WorkflowInfo> listWorkflows(); ComponentQuery createComponentQuery(); static WorkflowDescription getWorkflow(String descriptor); static String getWorkflowContent(WorkflowInfo workflowInfo);  }